/* ============================================
   MODERNÍ FUTURISTICKÝ DESIGN
   Inspirováno: Apple, Tesla, High-end Tech
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Moderní elegantní barvy */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-blue: #4f46e5;
    --accent-purple: #7c3aed;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --bg-dark: #0f0f1a;
    --bg-darker: #08080f;
    --bg-card: rgba(20, 20, 35, 0.6);
    --border-subtle: rgba(255, 255, 255, 0.1);
    --shadow-glow: rgba(79, 70, 229, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   ANIMOVANÁ ZEMĚKOULE - JEMNÁ A ELEGANTNÍ
============================================ */
.globe-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.globe-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle at 30% 30%, 
        rgba(79, 70, 229, 0.1) 0%, 
        rgba(124, 58, 237, 0.05) 30%,
        transparent 60%);
    border-radius: 50%;
    animation: rotateGlobe 120s linear infinite;
    opacity: 0.5;
}

@keyframes rotateGlobe {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Jemná mřížka */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(79, 70, 229, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 70, 229, 0.02) 1px, transparent 1px);
    background-size: 100px 100px;
    z-index: 1;
    pointer-events: none;
}

/* Gradient overlay pro hloubku */
.gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, transparent 0%, var(--bg-dark) 100%);
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   HEADER - MINIMALISTICKÝ A ČISTÝ
============================================ */
.modern-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

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

.nav-menu a:hover::after {
    width: 100%;
}

/* Hamburger menu pro mobil */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 26, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 2rem;
    z-index: 999;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 1rem 0;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu a:last-child {
    border-bottom: none;
}

/* ============================================
   HERO - S ROTACÍ OBRÁZKŮ A VIDEA
============================================ */
.hero-section {
    position: relative;
    z-index: 10;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px; /* Prostor pro header */
}

/* Slideshow pozadí */
.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img,
.hero-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
}

/* Gradient overlay přes hero */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 15, 26, 0.4) 0%, rgba(15, 15, 26, 0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(79, 70, 229, 0.15);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #a78bfa;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
    font-weight: 400;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
}

.stat-card {
    padding: 2rem 2.5rem;
    background: rgba(20, 20, 35, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.5);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   FILTRY - ČISTÉ A MINIMALISTICKÉ
============================================ */
.filters-section {
    position: relative;
    z-index: 50;
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.filter-card {
    background: rgba(20, 20, 35, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 2rem 2.5rem;
}

.filter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    padding: 0.75rem 1.75rem;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

/* Dropdown pro mobil */
.filter-dropdown {
    display: none;
}

.filter-dropdown-button {
    width: 100%;
    padding: 1rem;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid var(--accent-blue);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-dropdown-content {
    display: none;
    margin-top: 1rem;
    background: rgba(20, 20, 35, 0.95);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.filter-dropdown-content.active {
    display: block;
}

.filter-dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.filter-dropdown-content a:hover,
.filter-dropdown-content a.active {
    background: var(--primary-gradient);
    color: white;
}

/* ============================================
   KVÍZ KARTY - ELEGANTNÍ GLASS MORPHISM
============================================ */
.quiz-grid {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto 6rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
}

.quiz-card {
    position: relative;
    background: rgba(20, 20, 35, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
}

.quiz-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.quiz-card:hover {
    transform: translateY(-8px);
    border-color: rgba(79, 70, 229, 0.5);
    box-shadow: 
        0 20px 60px rgba(79, 70, 229, 0.2),
        0 0 0 1px rgba(79, 70, 229, 0.1) inset;
}

.quiz-image-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.quiz-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.quiz-card:hover .quiz-image {
    transform: scale(1.05);
}

.quiz-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 15, 26, 0.8) 100%);
}

.quiz-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1.25rem;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-content {
    padding: 2rem;
}

.quiz-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.quiz-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.quiz-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.quiz-meta-item {
    padding: 0.4rem 1rem;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    color: #a78bfa;
}

.quiz-play-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: var(--primary-gradient);
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
}

.quiz-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
}

/* ============================================
   FOOTER - MINIMALISTICKÝ
============================================ */
.modern-footer {
    position: relative;
    z-index: 10;
    padding: 4rem 2rem;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   SCROLL ANIMATIONS
============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .quiz-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Header - hamburger menu */
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-inner {
        padding: 1rem 1.5rem;
    }
    
    /* Hero - menší text, více prostoru */
    .hero-section {
        height: auto;
        min-height: 70vh;
        padding: 120px 1rem 4rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .stat-card {
        padding: 1.5rem 2rem;
    }
    
    /* Editovatelná sekce - plná šířka */
    .editable-section {
        margin: 3rem auto;
        padding: 0 1rem;
    }
    
    .editable-card {
        padding: 2rem 1.5rem;
    }
    
    .editable-title {
        font-size: 1.5rem;
    }
    
    .editable-content {
        font-size: 1rem;
    }
    
    /* Filtry - dropdown na mobilu */
    .filters-section {
        margin: 2rem auto;
        padding: 0 1rem;
    }
    
    .filter-card {
        padding: 1.5rem;
    }
    
    .filter-options {
        display: none; /* Skrýt buttony */
    }
    
    .filter-dropdown {
        display: block; /* Zobrazit dropdown */
    }
    
    /* Reklamní bloky */
    .ad-block {
        margin: 2rem auto;
        padding: 0 1rem;
    }
    
    .ad-container {
        padding: 1.5rem;
        min-height: 100px;
    }
    
    /* Kvíz karty - plná šířka */
    .quiz-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
        margin-bottom: 3rem;
    }
    
    .quiz-card {
        max-width: 100%;
    }
    
    .quiz-content {
        padding: 1.5rem;
    }
    
    .quiz-title {
        font-size: 1.3rem;
    }
    
    /* Footer */
    .modern-footer {
        padding: 2rem 1.5rem;
    }
}

/* ============================================
   ANIMACE DELAY PRO KARTY
============================================ */
.quiz-card:nth-child(1) { transition-delay: 0.1s; }
.quiz-card:nth-child(2) { transition-delay: 0.2s; }
.quiz-card:nth-child(3) { transition-delay: 0.3s; }
.quiz-card:nth-child(4) { transition-delay: 0.4s; }
.quiz-card:nth-child(5) { transition-delay: 0.5s; }
.quiz-card:nth-child(6) { transition-delay: 0.6s; }
.quiz-card:nth-child(7) { transition-delay: 0.7s; }
.quiz-card:nth-child(8) { transition-delay: 0.8s; }
.quiz-card:nth-child(9) { transition-delay: 0.9s; }

/* ============================================
   EDITOVATELNÁ SEKCE POD HERO
============================================ */
.editable-section {
    position: relative;
    z-index: 100;
    max-width: 1200px;
    margin: 6rem auto;
    padding: 0 2rem;
}

.editable-container {
    width: 100%;
}

.editable-card {
    background: rgba(20, 20, 35, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--accent-blue);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.editable-card::before {
    content: '💡';
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 4rem;
    opacity: 0.05;
}

.editable-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.editable-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.editable-content p {
    margin-bottom: 1rem;
}

/* ============================================
   REKLAMNÍ BLOKY
============================================ */
.ad-block {
    position: relative;
    z-index: 100;
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.ad-container {
    background: rgba(20, 20, 35, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.ad-container:empty::before {
    content: 'Reklamní prostor';
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.5;
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .globe-sphere {
        animation: none !important;
    }
    
    .grid-overlay {
        animation: none !important;
    }
    
    .hero-slide {
        transition: none !important;
    }
    
    .quiz-card {
        animation: none !important;
        transition: opacity 0.3s ease !important;
    }
    
    .fade-in {
        transition: opacity 0.3s ease !important;
    }
}

/* ============================================
   PAGINATION - MODERNÍ FUTURISTICKÁ TLAČÍTKA
============================================ */
.pagination {
    position: relative;
    z-index: 100;
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.pagination-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0 1.25rem;
    background: rgba(20, 20, 35, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pagination-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.pagination-btn:hover {
    color: var(--text-primary);
    border-color: rgba(79, 70, 229, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.pagination-btn:hover::before {
    opacity: 0.15;
}

.pagination-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.pagination-btn.active:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.5);
}

.pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination {
        margin: 3rem auto;
        padding: 0 1rem;
    }
    
    .pagination-inner {
        gap: 0.5rem;
    }
    
    .pagination-btn {
        min-width: 42px;
        height: 42px;
        padding: 0 1rem;
        font-size: 0.9rem;
    }
    
    .pagination-dots {
        min-width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}