/* ============================================
   License Plate Recognition - Slideshow Styles
   ============================================ */

:root {
    /* Color Palette - Gold/Yellow Theme */
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --primary-light: #fbbf24;
    --secondary: #10b981;
    --accent: #ef4444;
    --background: #0f0f1a;
    --surface: #1a1a2e;
    --surface-light: #252542;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fcd34d 100%);
    --gradient-surface: linear-gradient(180deg, rgba(245, 158, 11, 0.1) 0%, transparent 100%);

    /* Shadows */
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(245, 158, 11, 0.3);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    overflow: hidden;
    min-height: 100vh;
}

/* ============================================
   Slideshow Container
   ============================================ */

.slideshow-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: var(--background);
    background-image:
        radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--surface);
    z-index: 1000;
}

.progress {
    height: 100%;
    background: var(--gradient-primary);
    width: 16.66%;
    transition: width var(--transition-normal);
}

/* ============================================
   Slides
   ============================================ */

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateX(50px);
    transition: all var(--transition-slow);
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.slide.prev {
    transform: translateX(-50px);
}

.slide-content {
    max-width: 1200px;
    width: 90%;
    padding: 2rem;
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Header */
.slide-header {
    text-align: center;
    margin-bottom: 3rem;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.demo-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 0 20px 10px rgba(16, 185, 129, 0);
    }
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Feature Cards (Slide 1)
   ============================================ */

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon.icon-detection {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.feature-icon.icon-detection::before {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid white;
    border-radius: 4px;
    position: relative;
}

.feature-icon.icon-detection::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid white;
    border-radius: 50%;
    margin-top: -8px;
    margin-left: -8px;
}

.feature-icon.icon-ocr {
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.feature-icon.icon-ocr::before {
    content: 'Aa';
}

.feature-icon.icon-speed {
    background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
}

.feature-icon.icon-speed::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 24px solid white;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.slide-footer {
    text-align: center;
    margin-top: 3rem;
}

.hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ============================================
   Stats Cards (Slide 2)
   ============================================ */

.stats-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem 2.5rem;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Glass Card */
.glass-card {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.glass-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.glass-card ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.glass-card li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.glass-card li:last-child {
    border-bottom: none;
}

.code-block {
    background: var(--background);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    color: var(--primary-light);
    overflow-x: auto;
}

/* ============================================
   Architecture Diagram (Slides 3 & 4)
   ============================================ */

.architecture-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.arch-diagram {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.arch-diagram.vertical {
    flex-direction: column;
}

.arch-block {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    min-width: 120px;
    border: 2px solid;
}

.arch-block.input {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--secondary);
    color: var(--secondary);
}

.arch-block.conv {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary-light);
}

.arch-block.lstm {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.arch-block.output {
    background: rgba(217, 70, 239, 0.1);
    border-color: #d946ef;
    color: #e879f9;
}

.arch-block small {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.arch-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.arch-arrow.down {
    font-size: 2rem;
}

.model-details {
    max-width: 600px;
    margin: 2rem auto 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-muted);
}

.detail-value {
    font-weight: 500;
    font-family: 'Monaco', 'Consolas', monospace;
    color: var(--primary-light);
}

/* ============================================
   Pipeline (Slide 5)
   ============================================ */

.pipeline-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.pipeline-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    min-width: 140px;
    transition: all var(--transition-normal);
}

.pipeline-step:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.pipeline-step.highlight {
    background: var(--gradient-primary);
    border: none;
}

.pipeline-step.highlight .step-number {
    background: rgba(255, 255, 255, 0.2);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pipeline-step.highlight .step-content p {
    color: rgba(255, 255, 255, 0.8);
}

.pipeline-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* ============================================
   Demo (Slide 6)
   ============================================ */

.demo-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.upload-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Sample Gallery */
.sample-gallery {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
}

.sample-gallery h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sample-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.sample-img {
    aspect-ratio: 16/9;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sample-img:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.sample-img.selected {
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.sample-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sample-placeholder {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* Separator */
.separator {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Upload Zone */
.upload-zone {
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-zone.dragover {
    border-color: var(--secondary);
    background: rgba(16, 185, 129, 0.1);
}

.upload-content {
    text-align: center;
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    background: var(--surface-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.upload-icon::before {
    content: '';
    width: 20px;
    height: 16px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
}

.upload-icon::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    top: 14px;
    left: 16px;
}

.upload-link {
    color: var(--primary-light);
    text-decoration: underline;
    cursor: pointer;
}

.preview-image {
    max-width: 100%;
    max-height: 250px;
    border-radius: 12px;
    object-fit: contain;
}

.preview-image.hidden {
    display: none;
}

.result-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 300px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
}

.result-header h3 {
    margin: 0;
}

.clear-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
}

.clear-btn:hover {
    background: #ef4444;
    color: white;
}

.clear-btn.hidden {
    display: none;
}

.clear-icon {
    font-weight: bold;
}

/* Preview Section */
.preview-section {
    width: 100%;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.preview-section.hidden {
    display: none;
}

.preview-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-align: left;
}

.result-preview-image {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    object-fit: contain;
    border: 2px solid var(--border);
}

.result-zone h3 {
    margin-bottom: 1.5rem;
    width: 100%;
}

.waiting-message {
    color: var(--text-muted);
    font-size: 1rem;
}

.result-plate {
    margin-top: 1rem;
}

.result-plate.hidden {
    display: none;
}

.plate-display {
    background: linear-gradient(180deg, #fff 0%, #e0e0e0 100%);
    color: #1a1a2e;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Monaco', 'Consolas', monospace;
    padding: 1rem 2rem;
    border-radius: 8px;
    border: 3px solid #333;
    letter-spacing: 4px;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--surface-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.demo-note {
    margin-top: 2rem;
    text-align: center;
}

.demo-note p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.demo-note code {
    background: var(--surface);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    color: var(--accent);
}

/* ============================================
   Navigation
   ============================================ */

.nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 100;
}

.nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.nav-btn.prev {
    left: 2rem;
}

.nav-btn.next {
    right: 2rem;
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn:disabled:hover {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: none;
}

/* Indicators */
.indicators {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 100;
}

.indicator {
    width: 12px;
    height: 12px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.indicator:hover {
    background: var(--primary-light);
}

.indicator.active {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.2);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    h1 {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .demo-container {
        grid-template-columns: 1fr;
    }

    .pipeline-container {
        flex-direction: column;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
    }

    .stats-container {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .slide-content {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .nav-btn.prev {
        left: 1rem;
    }

    .nav-btn.next {
        right: 1rem;
    }

    .arch-diagram {
        flex-direction: column;
    }

    .arch-arrow {
        transform: rotate(90deg);
    }
}