/* Import clean, modern typography */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(17, 24, 39, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-color: #3b82f6;
    --accent-hover: #60a5fa;
    --success-color: #10b981;
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background grid animation */
.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
    pointer-events: none;
}

/* Landing overlay */
.landing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 15, 25, 0.95);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.landing-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.landing-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 24px;
    width: 90%;
    max-width: 550px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 30%, var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn-start {
    background: linear-gradient(135deg, var(--accent-color), #2563eb);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, var(--accent-hover), var(--accent-color));
}

.btn-start:active {
    transform: translateY(1px);
}

.shortcut-info {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.shortcut-info span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.key-cap {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-family: monospace;
    font-weight: bold;
    color: var(--text-primary);
}

/* Slideshow Container */
.slideshow-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    cursor: pointer;
}

.slide-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
    box-shadow: var(--shadow-lg);
}

.slide-img.active {
    opacity: 1;
    z-index: 5;
}

/* Fullscreen mode: stretch the images to fill the screen completely */
:fullscreen .slide-img,
:-webkit-full-screen .slide-img {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    object-fit: fill !important;
    box-shadow: none !important;
}

/* Progress bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 100;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    transition: width 0.05s linear;
}

/* Controls Panel */
.controls-panel {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.controls-panel.hidden {
    opacity: 0;
    transform: translate(-50%, 1rem);
    pointer-events: none;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-hover);
}

.control-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.slide-counter {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 60px;
    text-align: center;
}

.divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition-smooth);
}

.status-badge.playing {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.status-badge.paused {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.control-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.control-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-hover);
}

.control-select option {
    background: var(--bg-color);
    color: var(--text-primary);
}

/* Center Play/Pause Overlay Indicator */
.action-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(11, 15, 25, 0.8);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
}

.action-indicator.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.action-indicator svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries for slide containment */
@media (max-width: 768px) {
    .landing-card {
        padding: 2rem;
    }
    .landing-title {
        font-size: 1.8rem;
    }
    .shortcut-info {
        flex-direction: column;
        gap: 0.8rem;
    }
}
