:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(100px);
    opacity: 0.5;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: rgba(59, 130, 246, 0.3);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: rgba(139, 92, 246, 0.3);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 50%;
    width: 40vw;
    height: 40vw;
    background: rgba(16, 185, 129, 0.2);
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

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

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.logo svg {
    color: var(--accent);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 3rem; }
.hidden { display: none !important; }
.full-width { width: 100%; }

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-primary {
    background: var(--glass-border);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-primary:hover { background: rgba(255,255,255,0.15); }

.btn-accent {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}
.btn-outline:hover { background: var(--glass-border); }

.btn-small {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    background: var(--glass-border);
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
}
.btn-small.active {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.5);
}

/* Upload Area */
.upload-area {
    border: 2px dashed rgba(59, 130, 246, 0.5);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.upload-area:hover, .upload-area.dragover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent);
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: 1rem;
}

.upload-area h3 { margin-bottom: 0.5rem; }
.upload-area p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.9rem; }
.upload-limit { font-size: 0.8rem !important; margin-top: 1rem; margin-bottom: 0 !important; opacity: 0.6; }

/* File List */
.file-list { margin-top: 1rem; }
.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    margin-bottom: 0.5rem;
}
.file-info { display: flex; align-items: center; gap: 1rem; }
.file-icon { color: var(--danger); }
.file-name { font-weight: 500; font-size: 0.95rem; }
.file-size { color: var(--text-secondary); font-size: 0.8rem; }
.remove-file { cursor: pointer; color: var(--text-secondary); background: none; border: none; }
.remove-file:hover { color: var(--danger); }

/* Settings Panel */
.settings-panel { margin-top: 2rem; transition: opacity 0.3s; }
.settings-panel.disabled { opacity: 0.5; pointer-events: none; }
.settings-panel h3 { margin-bottom: 1rem; font-size: 1.2rem; }

.mode-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.mode-card {
    cursor: pointer;
}
.mode-card input { display: none; }
.card-content {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s;
    height: 100%;
}
.mode-title { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.mode-desc { display: block; font-size: 0.75rem; color: var(--text-secondary); }

.mode-card input:checked + .card-content {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.custom-settings h4 { margin-bottom: 1rem; color: var(--text-secondary); }
.setting-row { margin-bottom: 1.5rem; }
.setting-row label { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.9rem; }
.setting-row span { color: var(--accent); font-weight: 600; }

.slider {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    background: var(--glass-border);
    border-radius: 3px;
    outline: none;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

.toggle-group { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-secondary);
}
.toggle input { display: none; }
.slider-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    background: var(--glass-border);
    border-radius: 20px;
    transition: 0.3s;
}
.slider-toggle:before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}
.toggle input:checked + .slider-toggle { background: var(--success); }
.toggle input:checked + .slider-toggle:before { transform: translateX(16px); }
.toggle input:checked ~ span { color: var(--text-primary); }

.premium-feature { color: #f59e0b; }

/* Right Panel */
.preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.preview-area {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
}
.empty-state { color: var(--text-secondary); }
#pdf-canvas { max-width: 100%; max-height: 100%; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }

/* Results */
.results-area { margin-top: 2rem; animation: slideUp 0.4s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-box {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--glass-border);
}
.stat-box.success { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.1); }
.stat-box.highlight { border-color: rgba(59, 130, 246, 0.3); background: rgba(59, 130, 246, 0.1); }
.stat-label { display: block; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.stat-value { display: block; font-size: 1.2rem; font-weight: 700; }
.stat-box.success .stat-value { color: var(--success); }
.stat-box.highlight .stat-value { color: #60a5fa; }

.action-buttons { display: flex; gap: 1rem; }
.action-buttons .btn { flex: 1; }

/* SEO Content */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.feature h4 { margin-bottom: 0.5rem; color: var(--text-primary); }
.feature p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }

@media (max-width: 900px) {
    .workspace-grid { grid-template-columns: 1fr; }
    .gradient-text { font-size: 2.2rem; }
}
