/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* High-contrast palette - Light Mode */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --secondary: #10b981;
    --accent: #f97316;
    --background: #e9eff7;
    --background-alt: #f8fafc;
    --surface: #ffffff;
    --surface-light: #f1f5ff;
    --surface-subtle: #f4f6fb;
    --surface-strong: #e2e8f0;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.14);
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #475569;
    --gradient: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    --gradient-warm: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 32px 60px rgba(15, 23, 42, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(148, 163, 184, 0.24);
}

/* Dark Mode */
[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: #93c5fd;
    --secondary: #34d399;
    --accent: #fb923c;
    --background: #0b1120;
    --background-alt: #111827;
    --surface: rgba(17, 24, 39, 0.92);
    --surface-light: rgba(30, 41, 59, 0.95);
    --surface-subtle: rgba(30, 41, 59, 0.78);
    --surface-strong: #1e293b;
    --border: rgba(148, 163, 184, 0.3);
    --border-strong: rgba(148, 163, 184, 0.42);
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5f5;
    --text-muted: #94a3b8;
    --shadow: 0 12px 32px rgba(2, 6, 23, 0.65);
    --shadow-lg: 0 32px 60px rgba(2, 6, 23, 0.75);
    --glass-bg: rgba(17, 24, 39, 0.88);
    --glass-border: rgba(148, 163, 184, 0.28);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(at 20% 30%, rgba(37, 99, 235, 0.08) 0px, transparent 55%),
        radial-gradient(at 80% 70%, rgba(96, 165, 250, 0.08) 0px, transparent 55%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
    background-image: 
        radial-gradient(at 20% 30%, rgba(96, 165, 250, 0.18) 0px, transparent 55%),
        radial-gradient(at 80% 70%, rgba(59, 130, 246, 0.18) 0px, transparent 55%);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem 0 2rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.6s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.header-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 1rem;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Upload Section */
.upload-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    animation: fadeIn 0.6s ease 0.2s both;
}

/* Printing Guides Section */
.guides-section {
    max-width: 400px;
    margin: 2rem auto 3rem;
    animation: fadeIn 0.6s ease 0.4s both;
    position: relative;
    z-index: 100;
}

.guides-dropdown {
    position: relative;
    z-index: 100;
}

.guides-toggle {
    width: 100%;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-align: center;
}

.guides-toggle:hover {
    background: var(--surface-light);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.guides-toggle .chevron {
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
}

.guides-toggle.active .chevron {
    transform: rotate(180deg);
}

.guides-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--surface) !important;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10000;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
}

.guides-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.guide-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
}

.guide-link:hover {
    background: var(--surface-light);
    color: var(--primary-light);
}

.guide-link:active {
    transform: scale(0.98);
}

/* Scrollbar styling for guides menu */
.guides-menu::-webkit-scrollbar {
    width: 8px;
}

.guides-menu::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 10px;
}

.guides-menu::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.guides-menu::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.upload-box {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    text-align: center;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.upload-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, rgba(90, 200, 250, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-box:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 122, 255, 0.15);
}

.upload-box:hover::before {
    opacity: 1;
}

.upload-box.dragover {
    border-color: var(--primary);
    background: rgba(0, 122, 255, 0.05);
    transform: scale(1.01);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    stroke-width: 2;
    stroke: url(#iconGradient);
    animation: float 3s ease-in-out infinite;
}

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

.upload-box h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.upload-box p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

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

.btn-primary {
    background: var(--primary);
    color: white !important;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
    color: white !important;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text-primary);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-full {
    width: 100%;
}

.btn-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Workspace */
.workspace {
    animation: fadeIn 0.6s ease;
}

.workspace-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Control Panel */
.control-panel {
    background: var(--surface);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 2rem;
    border: 1px solid var(--border);
}

.control-panel h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 700;
}

.config-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    animation: slideInLeft 0.4s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.config-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.config-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-name {
    padding: 1rem;
    background: var(--surface-subtle);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    word-break: break-all;
    border: 1px solid var(--border);
}

/* Input Groups */
.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-group input[type="number"],
.input-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    font-size: 1rem;
    background: var(--background);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-weight: 500;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: var(--surface);
}

.input-group select {
    cursor: pointer;
}

.info-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    border: 2px solid var(--primary);
    border-radius: 0.75rem;
    padding: 1rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-top: 1rem;
    font-weight: 600;
}

/* Preview Area */
.preview-area {
    background: var(--surface);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    animation: slideInRight 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.preview-header {
    margin-bottom: 2rem;
}

.preview-header h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
    font-weight: 700;
}

.preview-container {
    background: var(--surface-light);
    border: 1px solid var(--border-strong);
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: auto;
    flex: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.preview-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.preview-container::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 10px;
}

.preview-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
    border: 2px solid var(--surface);
}

.preview-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

#previewCanvas {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay p {
    color: var(--text-primary);
    margin-top: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Guides Grid Styling */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.guide-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.guide-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.guide-card h2 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.guide-card h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.guide-card h2 a:hover {
    color: var(--primary-light);
}

.guide-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.guide-cta {
    display: inline-block;
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.guide-cta:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* Related Guides Section */
.related-guides {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.related-guides h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.related-guides ul {
    list-style: none;
    padding: 0;
}

.related-guides li {
    margin-bottom: 1rem;
}

.related-guides a {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.related-guides a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .guides-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .guide-card {
        padding: 1.5rem;
    }
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 2.5rem 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.footer a:hover {
    color: var(--secondary);
}

.footer a:hover::after {
    width: 100%;
}

.footer .separator {
    margin: 0 0.75rem;
    color: var(--border);
}

/* Share Section */
.share-section {
    margin-bottom: 2rem;
    animation: fadeIn 0.6s ease;
    position: relative;
    z-index: 1;
}

.share-text {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 2rem !important;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.share-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-btn:hover::before {
    opacity: 1;
}

.share-btn svg {
    width: 28px;
    height: 28px;
    position: relative;
    z-index: 1;
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.share-btn.whatsapp:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

.share-btn.imessage {
    background: linear-gradient(135deg, #34c759, #30d158);
    color: white;
}

.share-btn.imessage:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 10px 25px rgba(52, 199, 89, 0.4);
}

.share-btn.email {
    background: linear-gradient(135deg, #ea4335, #c5221f);
    color: white;
}

.share-btn.email:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 10px 25px rgba(234, 67, 53, 0.4);
}

.footer-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 2rem 0 1rem 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .control-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header h1 {
        font-size: 2.25rem;
    }
    
    .header-description {
        font-size: 0.95rem;
        padding: 0 1rem;
    }

    .upload-box {
        padding: 3rem 2rem;
    }

    .preview-container {
        padding: 1rem;
    }

    .control-panel {
        padding: 1.5rem;
    }

    .workspace-grid {
        gap: 1.5rem;
    }
    
    .guides-section {
        margin: 1.5rem auto 2rem;
        max-width: 100%;
        padding: 0 0.5rem;
    }
    
    .guides-toggle {
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
    }
    
    .guide-link {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
    }
}

/* Fun hover effects */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.btn-primary:hover {
    animation: pulse 2s ease-in-out infinite;
}

/* Gradient definition for SVG */
svg defs {
    display: none;
}

/* Upload + Guides Side by Side Layout */
.upload-and-guides-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    animation: fadeIn 0.6s ease 0.2s both;
    width: 100%;
    align-items: start;
}

.upload-section-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    min-width: 0;
}

.guides-list-container {
    background: var(--surface);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-radius: 1.5rem;
    padding: 1.75rem;
    border: 1px solid var(--border);
    animation: fadeIn 0.6s ease 0.3s both;
    box-shadow: var(--shadow);
    width: 100%;
    height: fit-content;
    min-width: 0;
}

.guides-list-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -0.01em;
}

.guides-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.guide-link-compact {
    padding: 0.85rem 1.1rem;
    background: var(--surface-subtle);
    border-radius: 0.85rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s ease;
    border: 1px solid var(--border);
    display: block;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.guide-link-compact:hover {
    background: var(--surface-light);
    color: var(--primary-dark);
    border-color: var(--primary);
    transform: translateX(6px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.15);
}

.guide-link-compact.featured {
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.4);
}

.guide-link-compact.featured:hover {
    background: var(--primary-dark);
    transform: translateX(6px) scale(1.01);
    box-shadow: 0 14px 30px rgba(29, 78, 216, 0.45);
}

/* How It Works Section */
.how-it-works-section {
    margin: 4rem 0;
    padding: 3rem 2rem;
    background: var(--surface);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    animation: fadeIn 0.6s ease 0.4s both;
    box-shadow: var(--shadow-lg);
}

.how-it-works-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.step-card {
    background: var(--surface);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    padding: 2rem;
    border-radius: 1.25rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.25s ease;
}

.step-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 54px;
    height: 54px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.step-card h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.step-card ul {
    list-style: none;
    padding: 0;
}

.step-card li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.step-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: 600;
}

/* Use Cases Section */
.use-cases-section {
    margin: 4rem 0;
    padding: 3rem 2rem;
    animation: fadeIn 0.6s ease 0.5s both;
}

.use-cases-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.use-case-card {
    background: var(--surface);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    padding: 2rem 1.5rem;
    border-radius: 1.25rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.25s ease;
    box-shadow: var(--shadow);
}

.use-case-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.use-case-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.use-case-card h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.use-case-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* FAQ Section */
.faq-section {
    margin: 4rem 0;
    padding: 3rem 2rem;
    background: var(--surface);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    animation: fadeIn 0.6s ease 0.6s both;
    box-shadow: var(--shadow-lg);
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--surface);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.25s ease;
}

.faq-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.faq-item h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-cta {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.faq-cta p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.faq-cta a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.faq-cta a:hover {
    text-decoration: underline;
}

/* Mobile Responsive for SEO sections */
@media (max-width: 768px) {
    .upload-and-guides-wrapper {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
    
    .how-it-works-section h2,
    .use-cases-section h2,
    .faq-section h2 {
        font-size: 1.5rem;
    }
}

/* Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.15);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
    transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
    transform: rotate(20deg);
}

/* Hide/show icons based on theme */
.theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

/* Mobile adjustments for theme toggle */
@media (max-width: 768px) {
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
    }
}
