/* Passport Photo Generator - Main Stylesheet */

/* Utility Classes for Inline Styles */
.hidden {
    display: none;
}

.mt-10 {
    margin-top: 10px;
}

.success-info {
    margin-top: 10px;
}

/* 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, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 40px 0;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px, 40px 40px;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #fff, #f0f8ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)); }
    to { filter: drop-shadow(0 4px 16px rgba(255,255,255,0.4)); }
}

.subtitle {
    color: #ecf0f1;
    font-size: 1.1rem;
}

.steps {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.step {
    background: white;
    border-radius: 10px;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.step.active {
    background: #3498db;
    color: white;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.step.active .step-number {
    background: white;
    color: #3498db;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 35px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.panel:hover::before {
    left: 100%;
}

.panel:hover {
    transform: translateY(-5px);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.panel h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5rem;
}

/* Editing Section - Full-Width Centered */
.editing-section {
    max-width: 900px;
    margin: 30px auto 0;
    padding: 0 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

select, input[type="number"], input[type="file"] {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(224, 224, 224, 0.8);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

select:focus, input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
}

.unit-toggle {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.unit-btn {
    flex: 1;
    padding: 8px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.unit-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.size-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.preset-sizes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
}

/* Responsive layout for preset buttons */
@media (max-width: 768px) {
    .preset-sizes {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .preset-sizes {
        grid-template-columns: repeat(2, 1fr);
    }
}

.preset-btn {
    padding: 5px 15px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

/* Increase preset button touch targets on mobile */
@media (max-width: 768px) {
    .preset-btn {
        padding: 12px 20px;  /* Increased from 5px 15px for 44x44px minimum touch target */
        font-size: 15px;  /* Slightly larger text on mobile */
        min-height: 44px;  /* Ensure minimum touch target height */
    }
}

.preset-btn:hover {
    border-color: #3498db;
    color: #3498db;
}

.preset-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

#upload-area {
    border: 3px dashed rgba(52, 152, 219, 0.6);
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg,
        rgba(248, 249, 250, 0.9) 0%,
        rgba(233, 236, 239, 0.9) 100%);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Reduce upload area padding on mobile to save vertical space */
@media (max-width: 768px) {
    #upload-area {
        padding: 35px 25px;  /* Reduced from 50px for mobile */
        border-radius: 15px;
    }
}

@media (max-width: 480px) {
    #upload-area {
        padding: 25px 20px;  /* Further reduced for small screens */
        border-radius: 12px;
    }

    #upload-area .upload-icon {
        font-size: 2.5rem;  /* Slightly smaller icon on very small screens */
    }

    #upload-area p {
        font-size: 14px;  /* Slightly smaller text */
    }
}

#upload-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(52, 152, 219, 0.1), transparent, transparent);
    animation: rotate 3s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

#upload-area:hover::before {
    opacity: 1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#upload-area:hover {
    background: linear-gradient(135deg,
        rgba(227, 242, 253, 0.95) 0%,
        rgba(187, 222, 251, 0.95) 100%);
    border-color: #2196f3;
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(52, 152, 219, 0.3);
}

#upload-area.dragover {
    background: linear-gradient(135deg,
        rgba(227, 242, 253, 0.95) 0%,
        rgba(187, 222, 251, 0.95) 100%);
    border-color: #2196f3;
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(52, 152, 219, 0.3);
}

/* Upload area when moved to editing section (added via JS) */
.editing-section #upload-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid rgba(139, 92, 246, 0.2);
    opacity: 0.85;
}

.editing-section #upload-area:hover {
    opacity: 1;
}

.upload-icon {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 10px;
}

#crop-container {
    position: relative;
    margin: 20px 0;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: visible;
    display: none;
}

/* Two-column grid for editing section */
.editing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.editing-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.editing-right {
    display: flex;
    flex-direction: column;
}

#crop-canvas {
    max-width: 100%;
    display: block;
    margin: 0 auto;
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #3498db, #2ecc71) border-box;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#crop-canvas:hover {
    box-shadow: 0 20px 50px rgba(52, 152, 219, 0.3);
}

.controls {
    margin-top: 0;
}

.slider-group {
    margin-bottom: 20px;
    position: relative;
}

/* Increase slider spacing on mobile */
@media (max-width: 768px) {
    .slider-group {
        margin-bottom: 30px;  /* Increased from 20px for better touch separation */
    }
}

.slider-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .slider-group label {
        margin-bottom: 12px;  /* More space on mobile */
        font-size: 15px;  /* Slightly larger labels */
    }
}

.slider-value {
    font-weight: 600;
    color: #3498db;
    background: #e3f2fd;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 13px;
    min-width: 55px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.slider {
    width: 100%;
    -webkit-appearance: none;
    height: 12px;
    border-radius: 20px;
    background: linear-gradient(to right, #e0e0e0 0%, #e0e0e0 50%, #e0e0e0 100%);
    outline: none;
    margin-top: 8px;
    position: relative;
    transition: all 0.3s ease;
}

/* Increase slider track height on mobile for better touch */
@media (max-width: 768px) {
    .slider {
        height: 18px;  /* Increased from 12px for easier touch interaction */
        margin-top: 12px;
    }
}

.slider:hover {
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Center line indicator for sliders */
.slider-group::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%; /* All sliders now centered at 50% */
    width: 2px;
    height: 14px;
    background: #95a5a6;
    transform: translateX(-50%);
    pointer-events: none;
    opacity: 0.6;
    border-radius: 1px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    border: 4px solid white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Increase slider thumb size on mobile for 44x44px touch target */
@media (max-width: 768px) {
    .slider::-webkit-slider-thumb {
        width: 44px;  /* Increased from 28px for better touch target */
        height: 44px;
        border: 5px solid white;
    }

    .slider::-moz-range-thumb {
        width: 44px;  /* Increased from 24px for better touch target */
        height: 44px;
        border: 5px solid white;
    }
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: 3px solid white;
    transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

/* Special styling for zoom slider to show extended zoom range */
#zoom-slider,
#modal-zoom-slider {
    background: linear-gradient(to right,
        #fce4e4 0%,      /* Light red for zoom out (50%) */
        #e0e0e0 16.67%,  /* Neutral zone */
        #e8f4fd 20%,     /* 100% zoom (default) */
        #c3e9fb 60%,     /* 200% zoom */
        #3498db 100%);   /* 300% zoom (max) */
}

/* Hue slider with rainbow gradient background */
#hue-slider {
    background: linear-gradient(to right,
        hsl(0, 70%, 70%) 0%,
        hsl(30, 70%, 70%) 8.33%,
        hsl(60, 70%, 70%) 16.66%,
        hsl(90, 70%, 70%) 25%,
        hsl(120, 70%, 70%) 33.33%,
        hsl(150, 70%, 70%) 41.66%,
        hsl(180, 70%, 70%) 50%,
        hsl(210, 70%, 70%) 58.33%,
        hsl(240, 70%, 70%) 66.66%,
        hsl(270, 70%, 70%) 75%,
        hsl(300, 70%, 70%) 83.33%,
        hsl(330, 70%, 70%) 91.66%,
        hsl(360, 70%, 70%) 100%);
}

/* Hue slider doesn't need center line since 0 is at center */
.slider-group:has(#hue-slider)::after {
    opacity: 0.8;
    background: #2c3e50;
    width: 3px;
}

/* Rotation slider styling */
#rotation-slider,
#modal-rotation-slider {
    background: linear-gradient(to right,
        #ffd4d4 0%,      /* Light red for counter-clockwise */
        #e0e0e0 50%,     /* Neutral at center (0°) */
        #d4e8ff 100%);   /* Light blue for clockwise */
}

/* Rotation reset button styling */
.rotation-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    margin-left: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.rotation-reset-btn:hover {
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.5);
}

.rotation-reset-btn:active {
    transform: rotate(180deg) scale(0.95);
}

.slider-group.with-reset-btn {
    position: relative;
    padding-right: 45px;
}

.slider-group.with-reset-btn .rotation-reset-btn {
    position: absolute;
    right: 0;
    top: 5px;
}

#preview-container {
    margin-top: 20px;
    margin-bottom: 30px;
    padding: 20px;
    padding-bottom: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    border-bottom: 3px solid #8b5cf6;
    text-align: center;
    display: none;
}

#preview-canvas {
    max-width: 100%;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background: white;
}

.download-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;  /* Changed from nowrap to wrap for mobile compatibility */
}

.download-buttons .btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
    white-space: nowrap;
}

/* Increase download button touch targets on mobile and prevent overflow */
@media (max-width: 768px) {
    .download-buttons .btn {
        padding: 14px 24px;  /* Increased from 10px 20px for better touch targets */
        font-size: 15px;  /* Slightly larger on mobile */
        min-height: 48px;  /* Ensure minimum touch target */
    }
}

@media (max-width: 480px) {
    .download-buttons {
        flex-direction: column;  /* Stack vertically on very small screens */
        gap: 12px;
        width: 100%;
    }

    .download-buttons .btn {
        width: 100%;  /* Full width on small screens */
        padding: 16px 28px;  /* Even larger touch targets */
        justify-content: center;
    }
}

.btn {
    padding: 15px 35px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(52, 152, 219, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(46, 204, 113, 0.6);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.info-box {
    background: #e8f4fd;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
}

.info-box p {
    margin: 0;
    color: #2c3e50;
}

/* Feature Highlights Section */
.feature-highlights {
    margin: 40px 0 30px 0;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.feature-card:nth-child(1) .feature-icon { animation-delay: 0s; }
.feature-card:nth-child(2) .feature-icon { animation-delay: 0.2s; }
.feature-card:nth-child(3) .feature-icon { animation-delay: 0.4s; }
.feature-card:nth-child(4) .feature-icon { animation-delay: 0.6s; }
.feature-card:nth-child(5) .feature-icon { animation-delay: 0.8s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.feature-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
    letter-spacing: 0.3px;
}

.feature-desc {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

.privacy-guarantee {
    background: linear-gradient(135deg, #e8f4fd 0%, #e8f8f0 100%);
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 12px;
    padding: 20px 30px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.privacy-guarantee::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.privacy-guarantee-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.guarantee-icons {
    font-size: 32px;
    display: flex;
    gap: 10px;
}

.guarantee-text {
    font-size: 17px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    letter-spacing: 0.3px;
}

.guarantee-highlight {
    color: #3498db;
    text-decoration: underline;
    text-decoration-color: rgba(52, 152, 219, 0.3);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* Responsive Design for Feature Cards */
@media (max-width: 1024px) {
    .feature-cards {
        grid-template-columns: repeat(2, 1fr);  /* 2 columns for better visual balance */
        gap: 20px;
        max-width: 650px;  /* Constrain width so cards don't get too wide */
        margin-left: auto;
        margin-right: auto;
    }

    /* Card 5 (last card) spans both columns and centers itself for 2-2-1 layout */
    .feature-card:nth-child(5) {
        grid-column: 1 / -1;  /* Span full width */
        max-width: 300px;  /* Match single card width approximately */
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .feature-highlights {
        margin: 30px 0 20px 0;
    }

    .feature-cards {
        grid-template-columns: 1fr;
        gap: 20px;  /* Increased from 15px for better spacing */
    }

    .feature-card {
        padding: 24px 20px;  /* Increased from 20px 18px for better touch targets */
    }

    .feature-card:nth-child(4),
    .feature-card:nth-child(5) {
        margin: 0;
    }

    .feature-icon {
        font-size: 48px;  /* Kept at 48px instead of reducing to 40px */
        margin-bottom: 14px;  /* Increased from 12px */
    }

    .feature-title {
        font-size: 17px;  /* Increased from 15px for better mobile readability */
        margin-bottom: 12px;  /* Added more spacing */
    }

    .feature-desc {
        font-size: 14px;  /* Increased from 12px for better mobile readability */
        line-height: 1.7;  /* Increased from 1.6 for better readability */
    }

    .privacy-guarantee {
        padding: 20px 22px;  /* Increased from 18px 20px */
    }

    .privacy-guarantee-content {
        flex-direction: column;
        gap: 12px;  /* Increased from 10px */
    }

    .guarantee-icons {
        font-size: 32px;  /* Increased from 28px */
    }

    .guarantee-text {
        font-size: 16px;  /* Increased from 15px for better readability */
        line-height: 1.6;  /* Increased from 1.5 */
    }
}

/* Dark Mode Support for Feature Cards */
body.dark-mode .feature-card {
    background: rgba(45, 52, 54, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .feature-title {
    color: #dfe6e9;
}

body.dark-mode .feature-desc {
    color: #b2bec3;
}

body.dark-mode .privacy-guarantee {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15) 0%, rgba(46, 204, 113, 0.15) 100%);
    border-color: rgba(52, 152, 219, 0.3);
}

body.dark-mode .guarantee-text {
    color: #dfe6e9;
}

body.dark-mode .guarantee-highlight {
    color: #74b9ff;
    text-decoration-color: rgba(116, 185, 255, 0.3);
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: auto;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .editing-section {
        padding: 0 15px;
    }

    .editing-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step {
        width: 90%;
        max-width: 300px;
    }

    .size-inputs {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Increase Undo/Redo/Reset button touch targets on mobile */
    #undo-btn,
    #redo-btn,
    #reset-btn {
        padding: 16px 14px !important;  /* Override inline styles - increased from 12px 10px */
        font-size: 15px !important;  /* Slightly larger text */
        min-height: 48px;  /* Ensure minimum touch target */
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.crop-hint {
    user-select: none;
}

.fullscreen-button-container {
    display: none; /* Hidden by default, shown when image is uploaded */
    text-align: center;
    margin: 0;
    padding: 15px;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 12px;
    border: 2px dashed rgba(52, 152, 219, 0.2);
}

.fullscreen-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    min-width: 220px;
    position: relative;
    overflow: hidden;
}

.fullscreen-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.fullscreen-button:hover::before {
    left: 100%;
}

.fullscreen-button:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.fullscreen-button:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.fullscreen-hint {
    color: #666;
    font-size: 13px;
    margin: 10px 0 0 0;
    font-style: italic;
    opacity: 0.8;
}

.error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

.success {
    color: #27ae60;
    font-size: 14px;
    margin-top: 5px;
}

/* Modal Styles for Fullscreen Image Editor */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 95vw;
    max-height: 90vh;  /* Reduced from 95vh to account for mobile browser UI (address bars) */
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #2c3e50;
    color: white;
    border-bottom: none;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 48px;   /* Increased from 40px for better touch target */
    height: 48px;  /* Increased from 40px to meet 44×44px minimum */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.1);
}

.modal-body {
    display: flex;
    flex: 1;
    min-height: 500px;
}

.modal-left {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
}

.modal-right {
    flex: 1;
    min-width: 320px;
    padding: 30px;
    background: white;
    overflow-y: auto;  /* Enable scrolling if content exceeds available height */
    max-height: 100%;  /* Don't exceed parent height */
    scroll-behavior: smooth;  /* Smooth scrolling */
    -webkit-overflow-scrolling: touch;  /* iOS smooth scrolling */
}

#modal-canvas {
    max-width: 100%;
    max-height: 60vh;
    cursor: grab;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    background: white;
}

#modal-canvas:active {
    cursor: grabbing;
}

.modal-hint {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
    text-align: center;
    font-style: italic;
}

.modal-controls h4 {
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.modal-buttons {
    margin-top: 20px;  /* Reduced from 30px to help fit buttons in viewport */
    display: flex;
    gap: 15px;
}

.modal-buttons .btn {
    flex: 1;
}

/* Custom scrollbar for modal-right panel */
.modal-right::-webkit-scrollbar {
    width: 8px;
}

.modal-right::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-right::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
    transition: background 0.3s;
}

.modal-right::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Responsive design for modal */
@media (max-width: 768px) {
    .modal-content {
        max-width: 98vw;
        max-height: 92vh;  /* Increased from 98vh to prevent overflow with browser UI */
        flex-direction: column;
    }

    .modal-body {
        flex-direction: column;
        min-height: auto;
    }

    .modal-left {
        flex: none;
        padding: 20px;  /* Keep at 20px for proper spacing */
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .modal-right {
        flex: none;
        min-width: auto;
        padding: 20px;  /* Keep at 20px for proper spacing */
    }

    #modal-canvas {
        max-height: 45vh;  /* Increased from 40vh for better visibility */
    }

    .modal-close {
        width: 52px;   /* Larger close button on mobile */
        height: 52px;
        font-size: 2.2rem;  /* Larger × symbol */
    }
}

@media (max-width: 480px) {
    .editing-section {
        padding: 0 10px;
    }

    .modal-content {
        max-height: 90vh;  /* Safe height accounting for iOS Safari address bar */
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h3 {
        font-size: 1.2rem;  /* Increased from 1.1rem for better readability */
    }

    .modal-left, .modal-right {
        padding: 18px;  /* Increased from 15px for less cramped feel */
    }

    #modal-canvas {
        max-height: 40vh;  /* Increased from 35vh for better visibility */
    }

    .modal-buttons {
        flex-direction: column;
        gap: 12px;  /* More spacing between stacked buttons */
    }

    .modal-buttons .btn {
        width: 100%;  /* Full width when stacked */
        padding: 16px;  /* Larger touch target */
        min-height: 48px;
    }

    .modal-body {
        overflow-y: auto;  /* Allow scrolling if content too tall */
        -webkit-overflow-scrolling: touch;  /* Smooth scrolling on iOS */
    }
}

/* Modal-specific slider optimizations for mobile */
@media (max-width: 768px) {
    #image-modal .slider::-webkit-slider-thumb {
        width: 44px;   /* Same as main sliders - 44×44px touch target */
        height: 44px;
        border: 5px solid white;
    }

    #image-modal .slider::-moz-range-thumb {
        width: 44px;   /* Same as main sliders - 44×44px touch target */
        height: 44px;
        border: 5px solid white;
    }

    #image-modal .slider {
        height: 18px;  /* Thicker track for easier touch */
    }

    #image-modal .slider-group {
        margin-bottom: 25px;  /* More spacing between sliders in modal */
    }

    #image-modal .slider-group label {
        margin-bottom: 12px;
        font-size: 15px;
    }
}

/* Floating action buttons */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 12px 35px rgba(52, 152, 219, 0.6);
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    z-index: 1000;
    transition: width 0.1s;
}

/* Dark Mode Styles */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-mode header {
    background: rgba(30, 30, 30, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .panel {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

body.dark-mode .panel h2 {
    color: #f0f0f0;
}

body.dark-mode label {
    color: #b0b0b0;
}

body.dark-mode select,
body.dark-mode input[type="number"],
body.dark-mode input[type="file"] {
    background: rgba(40, 40, 40, 0.9);
    border: 2px solid rgba(80, 80, 80, 0.8);
    color: #e0e0e0;
}

body.dark-mode select:focus,
body.dark-mode input:focus {
    background: rgba(50, 50, 50, 1);
    border-color: #3498db;
    color: #ffffff;
}

body.dark-mode .unit-btn,
body.dark-mode .preset-btn {
    background: rgba(40, 40, 40, 0.9);
    border: 2px solid #404040;
    color: #e0e0e0;
}

body.dark-mode .unit-btn:hover,
body.dark-mode .preset-btn:hover {
    border-color: #3498db;
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

body.dark-mode .unit-btn.active,
body.dark-mode .preset-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

body.dark-mode #upload-area {
    background: linear-gradient(135deg,
        rgba(40, 40, 40, 0.9) 0%,
        rgba(50, 50, 50, 0.9) 100%);
    border: 3px dashed rgba(52, 152, 219, 0.4);
    color: #e0e0e0;
}

body.dark-mode #upload-area:hover {
    background: linear-gradient(135deg,
        rgba(50, 50, 50, 0.95) 0%,
        rgba(60, 60, 60, 0.95) 100%);
}

body.dark-mode #crop-container {
    background: #1a1a1a;
}

body.dark-mode #preview-container {
    background: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .info-box {
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid #3498db;
}

body.dark-mode .info-box p {
    color: #b0b0b0;
}

body.dark-mode .step {
    background: rgba(40, 40, 40, 0.95);
    color: #e0e0e0;
}

body.dark-mode .step.active {
    background: #3498db;
    color: white;
}

body.dark-mode .step-number {
    background: #4a4a4a;
    color: #e0e0e0;
}

body.dark-mode .step.active .step-number {
    background: white;
    color: #3498db;
}

body.dark-mode .slider-value {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

/* Dark mode support for rotation reset button */
body.dark-mode .rotation-reset-btn {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
}

body.dark-mode .fullscreen-button-container {
    background: rgba(52, 152, 219, 0.08);
    border: 2px dashed rgba(52, 152, 219, 0.3);
}

body.dark-mode .fullscreen-hint {
    color: #999;
}

body.dark-mode .modal-content {
    background: #1a1a1a;
}

body.dark-mode .modal-header {
    background: #0f0f0f;
}

body.dark-mode .modal-left {
    background: #252525;
    border-right: 1px solid #3a3a3a;
}

body.dark-mode .modal-right {
    background: #1a1a1a;
}

body.dark-mode .modal-controls h4 {
    color: #f0f0f0;
    border-bottom: 2px solid #3498db;
}

body.dark-mode .modal-hint {
    color: #999;
}

body.dark-mode .error {
    color: #e74c3c;
}

body.dark-mode .success {
    color: #27ae60;
}

/* Dark mode styles for buttons */
body.dark-mode .btn-danger {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

body.dark-mode .btn-danger:hover {
    background: linear-gradient(135deg, #a93226, #c0392b);
    box-shadow: 0 12px 35px rgba(231, 76, 60, 0.5);
}

body.dark-mode .btn-primary {
    background: linear-gradient(135deg, #2980b9, #3498db);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

body.dark-mode .btn-primary:hover {
    background: linear-gradient(135deg, #1f5f8b, #2980b9);
    box-shadow: 0 12px 35px rgba(52, 152, 219, 0.5);
}

body.dark-mode .btn-secondary {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.3);
}

body.dark-mode .btn-secondary:hover {
    background: linear-gradient(135deg, #1e8449, #27ae60);
    box-shadow: 0 12px 35px rgba(46, 204, 113, 0.5);
}

/* Dark mode for radio labels */
body.dark-mode .radio-label {
    background: #2d3436;
    color: #dfe6e9;
    border-color: #4a5568;
}

body.dark-mode .radio-label:hover {
    background: #34495e;
    border-color: #3498db;
}

body.dark-mode .radio-label input:checked + span {
    color: #3498db;
}

/* Dark mode for modal close button */
body.dark-mode .modal-close {
    color: #dfe6e9;
    background: #2d3436;
}

body.dark-mode .modal-close:hover {
    background: #e74c3c;
    color: white;
}

/* Dark mode for modal buttons section */
body.dark-mode .modal-buttons .btn {
    border: 1px solid #4a5568;
}

/* Dark mode for floating buttons */
body.dark-mode .floating-btn {
    background: linear-gradient(135deg, #2980b9, #3498db);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

body.dark-mode .floating-btn:hover {
    background: linear-gradient(135deg, #1f5f8b, #2980b9);
    box-shadow: 0 12px 35px rgba(52, 152, 219, 0.6);
}

/* Dark mode for input range sliders */
body.dark-mode input[type="range"] {
    background: #4a5568;
}

body.dark-mode input[type="range"]::-webkit-slider-thumb {
    background: #3498db;
    border: 2px solid #2d3436;
}

body.dark-mode input[type="range"]::-moz-range-thumb {
    background: #3498db;
    border: 2px solid #2d3436;
}

/* Dark mode for canvas borders */
body.dark-mode #crop-canvas,
body.dark-mode #preview-canvas,
body.dark-mode #modal-canvas {
    border-color: #4a5568;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Dark mode for scroll indicator */
body.dark-mode .scroll-indicator {
    background: linear-gradient(90deg, #2980b9, #27ae60);
}

/* Dark mode for fullscreen button */
body.dark-mode .fullscreen-button {
    background: linear-gradient(135deg, #2980b9, #3498db);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

body.dark-mode .fullscreen-button:hover {
    background: linear-gradient(135deg, #1f5f8b, #2980b9);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

body.dark-mode .fullscreen-hint {
    color: #95a5a6;
}

body.dark-mode .fullscreen-button-container {
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.3);
}

/* Dark mode for Help & Privacy modals */
body.dark-mode #help-modal .modal-content,
body.dark-mode #privacy-modal .modal-content {
    background: #2d3436;
    color: #dfe6e9;
    border: 1px solid #4a5568;
}

body.dark-mode #help-modal h2,
body.dark-mode #privacy-modal h2,
body.dark-mode #help-modal h3,
body.dark-mode #privacy-modal h3 {
    color: #74b9ff;
}

body.dark-mode #help-modal details summary,
body.dark-mode #privacy-modal details summary {
    background: #34495e;
    color: #dfe6e9;
}

body.dark-mode #help-modal details summary:hover {
    background: #3d5a80;
}

body.dark-mode #help-modal details > div,
body.dark-mode #privacy-modal details > div {
    background: #34495e;
    border-left-color: #74b9ff;
}

body.dark-mode #help-modal a,
body.dark-mode #privacy-modal a {
    color: #74b9ff;
}

body.dark-mode #help-modal .close,
body.dark-mode #privacy-modal .close {
    color: #dfe6e9;
}

body.dark-mode #help-modal .close:hover,
body.dark-mode #privacy-modal .close:hover {
    color: #ff7675;
}

/* Dark mode for footer */
body.dark-mode footer {
    background: rgba(45, 52, 54, 0.9);
    border-top-color: rgba(116, 185, 255, 0.2);
}

body.dark-mode footer a {
    color: #dfe6e9;
}

body.dark-mode footer a:hover {
    opacity: 0.7;
}

/* Comprehensive Footer Styling */
footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    margin-top: 60px;
    padding: 0;
}

.footer-top {
    text-align: center;
    padding: 40px 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    font-size: 15px;
    margin: 5px 0;
    opacity: 0.9;
    font-weight: 500;
}

.footer-note {
    font-size: 13px;
    margin: 8px 0 0 0;
    opacity: 0.7;
    font-style: italic;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.footer-column {
    text-align: left;
}

.footer-heading {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 20px 0;
    opacity: 0.9;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    opacity: 0.85;
}

.footer-link:hover {
    opacity: 1;
    transform: translateX(5px);
    color: #74b9ff;
}

.footer-link-icon {
    font-size: 16px;
}

.footer-enterprise {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15) 0%, rgba(46, 204, 113, 0.15) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px 30px;
    margin: 0 20px 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.footer-enterprise-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.footer-enterprise-desc {
    font-size: 13px;
    margin: 0;
    opacity: 0.85;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 25px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    font-size: 13px;
    margin: 0 0 10px 0;
    opacity: 0.8;
}

.footer-love {
    font-size: 13px;
    margin: 0;
    opacity: 0.7;
    font-style: italic;
}

.footer-love .heart {
    color: #e74c3c;
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20%, 40% { transform: scale(1); }
}

/* Footer Responsive Design */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        padding: 35px 20px;
    }

    .footer-brand {
        font-size: 22px;
    }

    .footer-tagline {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .footer-top {
        padding: 30px 20px 25px;
    }

    .footer-brand {
        font-size: 20px;
    }

    .footer-tagline {
        font-size: 14px;  /* Increased from 13px for better readability */
    }

    .footer-note {
        font-size: 13px;  /* Increased from 12px */
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 20px;
    }

    .footer-column {
        text-align: center;
    }

    .footer-heading {
        text-align: center;
        border-bottom: none;
        padding-bottom: 5px;
        font-size: 15px;  /* Increased for better readability */
    }

    .footer-links {
        text-align: center;
    }

    .footer-links li {
        margin-bottom: 18px;  /* Increased from 12px for better touch spacing */
    }

    .footer-link {
        justify-content: center;
        font-size: 15px;  /* Increased from 14px */
        padding: 10px 16px;  /* Added padding for larger touch target */
        min-height: 44px;  /* Ensure minimum touch target */
        display: inline-flex;  /* Ensure padding applies correctly */
        border-radius: 8px;  /* Visual feedback area */
        transition: background 0.3s ease;
    }

    .footer-link:hover {
        transform: translateX(0);
        background: rgba(255, 255, 255, 0.1);  /* Add hover background on mobile */
    }

    .footer-enterprise {
        margin: 0 15px 25px;
        padding: 20px 22px;  /* Increased from 18px 20px */
    }

    .footer-enterprise-title {
        font-size: 16px;  /* Increased from 15px */
        flex-direction: column;
        gap: 5px;
    }

    .footer-enterprise-desc {
        font-size: 13px;  /* Increased from 12px */
    }

    .footer-bottom {
        padding: 20px 15px;
    }

    .footer-copyright {
        font-size: 13px;  /* Increased from 12px */
    }

    .footer-love {
        font-size: 13px;  /* Increased from 12px */
    }
}

/* Dark Mode for New Footer */
body.dark-mode footer {
    background: rgba(45, 52, 54, 0.9);
    border-top-color: rgba(116, 185, 255, 0.2);
}

body.dark-mode .footer-top {
    border-bottom-color: rgba(116, 185, 255, 0.1);
}

body.dark-mode .footer-brand {
    background: linear-gradient(135deg, #dfe6e9 0%, #b2bec3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode .footer-heading {
    border-bottom-color: rgba(116, 185, 255, 0.2);
}

body.dark-mode .footer-link {
    color: #dfe6e9;
}

body.dark-mode .footer-link:hover {
    color: #74b9ff;
}

body.dark-mode .footer-enterprise {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2) 0%, rgba(46, 204, 113, 0.2) 100%);
    border-color: rgba(116, 185, 255, 0.3);
}

body.dark-mode .footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    border-top-color: rgba(116, 185, 255, 0.1);
}

/* Dark mode transition for smooth switching */
body,
.panel,
.step,
select,
input,
.unit-btn,
.preset-btn,
#upload-area,
#preview-container,
.info-box,
.modal-content,
.modal-header,
.modal-left,
.modal-right,
.btn,
.floating-btn,
.scroll-indicator {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
