/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

/* Disable text selection globally */
html, body {
    -webkit-user-select: none; /* Safari/Chrome/iOS */
    -ms-user-select: none;     /* Old Edge/IE */
    user-select: none;         /* Standard */
}

/* Allow selection for form inputs and editable content */
input, textarea, [contenteditable="true"],
input *, textarea *, [contenteditable="true"] * {
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    position: relative;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2c3e50;
}

header h1 i {
    margin-right: 10px;
}

.tagline {
    font-size: 1.2rem;
    color: #5a6c7d;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e0e3e7;
    color: #2c3e50;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.lang-btn .fi,
.lang-option .fi {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.lang-btn:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8ecf1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.lang-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 180px;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: white;
    color: #333;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

#currentLang {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-option:hover {
    background: #f8f9ff;
}

.lang-option:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

/* Install Button */
.install-btn {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.install-btn:hover {
    background: linear-gradient(135deg, #357abd 0%, #2868a8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

/* Features Bar */
.features-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.feature {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 10px 20px;
    border-radius: 25px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e0e3e7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.feature i {
    font-size: 1.2rem;
    flex-shrink: 0;
    color: #4a90e2;
}

/* Main Content */
main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

body.modal-open {
    overflow: hidden;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.drop-zone {
    border: 3px dashed #4a90e2;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.drop-zone.drag-over {
    background: #e8f4fd;
    border-color: #357abd;
    transform: scale(1.02);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-icon {
    width: 80px;
    height: 80px;
    color: #4a90e2;
    margin-bottom: 10px;
}

.drop-zone h2 {
    color: #4a90e2;
    font-size: 2rem;
}

.drop-zone p {
    color: #666;
    font-size: 1.1rem;
}

.supported-formats {
    font-size: 0.9rem !important;
    color: #999 !important;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: #4a90e2;
    color: white;
}

.btn-primary:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    background: #f1f3f4;
    color: #333;
}

.btn-secondary:hover {
    background: #e1e3e4;
}

.btn-process {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    font-size: 1.3rem;
    padding: 18px 50px;
    width: 100%;
    max-width: 400px;
}

.btn-process:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(74, 144, 226, 0.4);
}

.btn-process:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Settings Section */
.settings-section {
    animation: fadeIn 0.5s ease;
}

/* Two Column Layout */
.two-column-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
    align-items: start;
}

.left-column {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding-right: 10px;
}

.left-column::-webkit-scrollbar {
    width: 6px;
}

.left-column::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.left-column::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 10px;
}

.left-column::-webkit-scrollbar-thumb:hover {
    background: #357abd;
}

.right-column {
    min-width: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accordion Settings */
.settings-accordion {
    margin-bottom: 0;
}

.accordion-item {
    background: #f8f9ff;
    border-radius: 12px;
    border: 1px solid #e8ebff;
    margin-bottom: 15px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    padding: 20px 25px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    text-align: left;
}

.accordion-header:hover {
    opacity: 0.9;
}

.accordion-header i {
    margin-right: 10px;
}

.accordion-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 25px;
}

.accordion-content.show {
    max-height: 2000px;
    padding: 25px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input[type="radio"] {
    margin-right: 8px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    z-index: 12000;
    padding: 20px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    margin-top: 8px;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group input[type="range"] {
    width: calc(100% - 50px);
    margin-right: 10px;
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

/* Toggle Switch Styles */
.toggle-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-top: 12px;
}

.toggle-option span:first-child {
    font-weight: 500;
    color: #555;
    flex: 1;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    transition: all 0.3s ease;
    border-radius: 28px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider:before {
    transform: translateX(24px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.4);
}

.toggle-switch input[type="checkbox"]:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.toggle-slider:hover {
    opacity: 0.9;
}

/* Padding Option Styles */
.padding-option {
    margin-left: 20px;
    padding-left: 20px;
    border-left: 3px solid #4a90e2;
    background: #f8f9ff;
    padding: 12px 15px;
    border-radius: 6px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.padding-color-option {
    margin-top: 15px;
    margin-left: 20px;
    padding: 12px 15px;
    background: #f8f9ff;
    border-radius: 6px;
    border-left: 3px solid #4a90e2;
    animation: slideIn 0.3s ease;
}

.padding-color-option label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.padding-color-option select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.padding-color-option select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Dynamic Input Sections */
.resize-dimensions,
.resize-percentage,
.resize-max,
.rename-custom,
.case-change {
    margin-top: 15px;
    margin-left: 25px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.resize-dimensions input {
    width: calc(50% - 5px);
    margin-right: 10px;
    margin-bottom: 10px;
}

.resize-percentage {
    display: flex;
    align-items: center;
    gap: 10px;
}

.resize-percentage input {
    width: 100px;
}

.number-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.number-options input {
    flex: 1;
}

.number-options select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.number-options select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.help-text {
    font-size: 0.85rem;
    color: #999;
    margin-top: 10px;
    font-style: italic;
}

/* Rename Preview */
.rename-preview {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #4a90e2;
}

.preview-label {
    font-weight: 600;
    color: #4a90e2;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.preview-label i {
    margin-right: 8px;
}

.preview-examples {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-example {
    padding: 10px 15px;
    background: #f8f9ff;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #333;
    border-left: 3px solid #4a90e2;
    word-break: break-all;
}

.preview-example.original {
    opacity: 0.6;
    font-size: 0.85rem;
    border-left-color: #999;
}

.preview-arrow {
    text-align: center;
    color: #4a90e2;
    font-size: 1.2rem;
    margin: 5px 0;
}

/* Preview Section */
.preview-section {
    margin-bottom: 30px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.preview-header h3 {
    color: #4a90e2;
    font-size: 1.5rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9ff;
    border-radius: 12px;
}

.preview-item {
    position: relative;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.preview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.preview-item-info {
    padding: 10px;
    font-size: 0.85rem;
}

.preview-item-name {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-item-size {
    color: #999;
    font-size: 0.75rem;
}

.preview-item-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.preview-item-remove:hover {
    background: rgba(255, 0, 0, 1);
}

/* Process Section */
.process-section {
    text-align: center;
    margin-top: 30px;
}

.progress-bar {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 40px;
    background: #f1f3f4;
    border-radius: 20px;
    overflow: hidden;
    margin: 20px auto;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: #333;
}

/* Processing Window */
.processing-window {
    margin-top: 20px;
    background: #f8f9ff;
    border: 2px solid #4a90e2;
    border-radius: 12px;
    padding: 15px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.processing-header {
    font-weight: 600;
    color: #4a90e2;
    margin-bottom: 10px;
    font-size: 0.95rem;
    text-align: center;
}

.processing-content {
    background: white;
    border-radius: 8px;
    padding: 12px;
    max-height: 150px;
    overflow-y: auto;
}

.processing-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #f8f9ff;
    border-radius: 6px;
    margin-bottom: 5px;
    animation: fadeInFile 0.3s ease;
}

@keyframes fadeInFile {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.file-icon {
    font-size: 1.2rem;
}

.file-name {
    flex: 1;
    font-size: 0.9rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.processing-content::-webkit-scrollbar {
    width: 6px;
}

.processing-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.processing-content::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 10px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    color: #5a6c7d;
}

.link-button {
    background: none;
    border: none;
    color: #4a90e2;
    cursor: pointer;
    font-weight: 700;
    padding: 0 4px;
    text-decoration: underline;
}

.link-button:hover {
    color: #357abd;
}

/* Scrollbar */
.preview-grid::-webkit-scrollbar {
    width: 8px;
}

.preview-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.preview-grid::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 10px;
}

.preview-grid::-webkit-scrollbar-thumb:hover {
    background: #357abd;
}

/* Tooltips */
[data-tooltip] {
    position: relative;
    cursor: help;
}

/* Override cursor for clickable elements with tooltips */
button[data-tooltip],
.btn[data-tooltip] {
    cursor: pointer;
}



/* JavaScript Tooltips (for overflow clipping issues) */
.js-tooltip {
    position: fixed;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    max-width: 250px;
    text-align: center;
    z-index: 10002;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.js-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* Download Success Notification */
.download-notification {
    position: fixed;
    top: 25%;
    right: -450px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 320px;
    max-width: 400px;
}

.download-notification.show {
    right: 30px;
}

.download-notification.hide {
    animation: slideOut 0.4s ease forwards;
}

@keyframes slideOut {
    to {
        right: -450px;
        opacity: 0;
    }
}

.notification-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.1rem;
}

.notification-icon {
    font-size: 1.5rem;
    animation: scaleIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.notification-message {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.95;
}

.notification-arrow {
    position: absolute;
    top: -40px;
    left: 20px;
    font-size: 2rem;
    color: #333;
    animation: pointUp 1.5s ease-in-out infinite;
    filter: drop-shadow(0 -2px 3px rgba(0, 0, 0, 0.2));
}

@keyframes pointUp {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Update Notification */
.update-notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transition: bottom 0.4s ease;
    min-width: 320px;
    max-width: 90%;
}

.update-notification.show {
    bottom: 30px;
}

.update-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.update-icon {
    font-size: 1.5rem;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.update-text {
    font-weight: 600;
    font-size: 1rem;
    flex: 1;
    min-width: 150px;
}

.update-btn {
    background: white;
    color: #4a90e2;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.update-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .two-column-layout {
        grid-template-columns: 350px 1fr;
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .left-column {
        position: relative;
        top: 0;
        max-height: none;
        padding-right: 0;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .header-top {
        flex-wrap: wrap;
        justify-content: center;
    }

    .features-bar {
        gap: 10px;
        flex-direction: column;
    }

    .feature {
        font-size: 0.85rem;
        padding: 8px 15px;
    }
    
    .language-selector {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .lang-btn {
        width: auto;
    }

    main {
        padding: 20px;
    }

    .accordion-header {
        font-size: 1.1rem;
        padding: 15px 20px;
    }
    
    .processing-window {
        max-width: 100%;
        padding: 12px;
    }
    
    .processing-header {
        font-size: 0.9rem;
    }

    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        max-height: 300px;
    }

    .btn-process {
        font-size: 1.1rem;
        padding: 15px 30px;
    }
    
    [data-tooltip]::before {
        max-width: 200px;
        font-size: 0.8rem;
    }
    
    .update-notification {
        min-width: 280px;
        padding: 15px 20px;
    }
    
    .update-content {
        flex-direction: column;
        text-align: center;
    }
    
    .update-text {
        font-size: 0.9rem;
    }
    
    .update-btn {
        width: 100%;
    }
}

/* Settings Button */
.settings-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e0e3e7;
    color: #2c3e50;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.settings-btn:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8ecf1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Unified Modal Base Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e0e3e7;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px 16px 0 0;
}

.modal-header h2,
.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.modal-header h2 i,
.modal-header h3 i {
    margin-right: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #7a8997;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #2c3e50;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 25px 30px;
    border-top: 1px solid #e0e3e7;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0 0 16px 16px;
}

.modal-footer .btn {
    flex: 1;
}

/* Settings Modal - inherits from base modal */
.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.settings-modal.show {
    opacity: 1;
}

.settings-modal-content {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.settings-modal.show .settings-modal-content {
    transform: scale(1);
}

.settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e0e3e7;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px 16px 0 0;
}

.settings-modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.settings-modal-header h2 i {
    margin-right: 10px;
}

.settings-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #7a8997;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.settings-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #2c3e50;
}

.settings-modal-body {
    padding: 30px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e0e3e7;
    transition: all 0.3s ease;
}

.setting-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.setting-info {
    flex: 1;
    padding-right: 20px;
}

.setting-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.05rem;
    display: block;
    margin-bottom: 8px;
}

.setting-description {
    color: #7a8997;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.settings-modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 25px 30px;
    border-top: 1px solid #e0e3e7;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0 0 20px 20px;
}

.settings-modal-footer .btn {
    flex: 1;
}

/* Settings Notification */
.settings-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: white;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #2c3e50;
}

.settings-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.settings-notification .notification-icon {
    font-size: 1.2rem;
}

/* Preview Item Without Image */
.preview-item-no-image {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8ecf1 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-placeholder {
    font-size: 3rem;
    opacity: 0.3;
}

/* Preview Disabled Message */
.preview-disabled-message {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8ecf1 100%);
    border-radius: 15px;
    border: 2px dashed #cbd5e0;
    text-align: center;
    min-height: 300px;
}

.preview-disabled-icon {
    font-size: 5rem;
    opacity: 0.3;
    margin-bottom: 20px;
}

.preview-disabled-text {
    max-width: 500px;
}

.preview-disabled-text strong {
    display: block;
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.preview-disabled-text p {
    font-size: 1.1rem;
    color: #7a8997;
    line-height: 1.6;
    margin: 0;
}

.preview-stats {
    margin-top: 15px !important;
    font-weight: 600;
    color: #4a90e2 !important;
    font-size: 1.2rem !important;
}

/* Mobile Adjustments for All Modals */
@media (max-width: 768px) {
    .modal-content,
    .settings-modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer,
    .settings-modal-header,
    .settings-modal-body,
    .settings-modal-footer {
        padding: 20px;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .setting-info {
        padding-right: 0;
    }

    .modal-footer,
    .settings-modal-footer {
        flex-direction: column;
    }

    .settings-notification {
        max-width: 90%;
        bottom: 20px;
    }
}

