/* =================================================================
   IGCTF RETEX - Modern CTF Presentation Style
   ================================================================= */

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

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #00d4ff;
    --secondary-blue: #0099cc;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --bg-dark: #0a0e17;
    --bg-darker: #050810;
    --bg-card: #151b2e;
    --border-color: #1e2942;
    --border-glow: #00d4ff;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent-green: #00ff88;
    --accent-red: #ff3366;
    --accent-yellow: #ffd700;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fira Code', monospace;
}

body {
    background: radial-gradient(ellipse at top, #0f1829 0%, #0a0e17 50%, #050810 100%);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    overflow: hidden;
    min-height: 100vh;
    position: relative;
}

/* Subtle grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Animated gradient orbs */
body::after {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    pointer-events: none;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-100px, 100px) rotate(120deg); }
    66% { transform: translate(100px, -50px) rotate(240deg); }
}

/* ===== CONTAINER ===== */
.container {
    max-width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

.slides-container {
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* ===== SLIDES ===== */
.slide {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 35px 60px 85px;
    overflow: hidden;
}

.slide.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.slide-content {
    max-width: 1400px;
    width: 100%;
    max-height: 100%;
    overflow: hidden;
}

/* Custom scrollbar */
.slide::-webkit-scrollbar {
    width: 8px;
}

.slide::-webkit-scrollbar-track {
    background: transparent;
}

.slide::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 4px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 700;
}

h1 {
    font-size: 2.3em;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-purple) 50%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

h2 {
    font-size: 1.8em;
    color: var(--text-primary);
}

h3 {
    font-size: 1.3em;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.4em;
    text-align: center;
    margin-top: -10px;
    font-weight: 400;
}

.center-text {
    text-align: center;
}

.big-text {
    font-size: 1.3em;
}

/* ===== LOGO ===== */
.logo-container {
    text-align: center;
    margin: 0 0 30px;
}

.main-logo {
    max-width: 250px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 212, 255, 0.6));
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 10px 30px rgba(0, 212, 255, 0.6));
    }
    50% {
        filter: drop-shadow(0 10px 50px rgba(168, 85, 247, 0.8));
    }
}

/* ===== INFO BOX ===== */
.info-box {
    background: linear-gradient(135deg, rgba(21, 27, 46, 0.8) 0%, rgba(21, 27, 46, 0.4) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 15px 20px;
    margin: 12px 0;
    backdrop-filter: blur(10px);
}

.info-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
}

.info-box.highlight {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-color: var(--border-glow);
}

.info-box p {
    margin: 12px 0;
    line-height: 1.8;
}

.info-box strong {
    color: var(--primary-blue);
    font-weight: 600;
}

/* ===== STATS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 10px 0;
}

.stat-card {
    background: linear-gradient(135deg, rgba(21, 27, 46, 0.6) 0%, rgba(30, 41, 66, 0.4) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 15px 15px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-glow);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
}

.stat-card.error {
    border-color: rgba(255, 51, 102, 0.5);
}

.stat-card.error:hover {
    border-color: var(--accent-red);
    box-shadow: 0 15px 40px rgba(255, 51, 102, 0.3);
}

.stat-card.success {
    border-color: rgba(0, 255, 136, 0.5);
}

.stat-card.success:hover {
    border-color: var(--accent-green);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.3);
}

.stat-number {
    font-size: 2.8em;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.stat-card.error .stat-number {
    background: linear-gradient(135deg, var(--accent-red), #ff6b9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card.success .stat-number {
    background: linear-gradient(135deg, var(--accent-green), #00ffaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.95em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* ===== IMAGES ===== */
.image-container {
    text-align: center;
    margin: 20px 0;
}

.image-container img,
.infra-img,
.scoreboard-img {
    max-width: 100%;
    max-height: 280px;
    height: auto;
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.image-container img:hover,
.infra-img:hover,
.scoreboard-img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 212, 255, 0.4);
}

.image-caption {
    color: var(--text-secondary);
    font-size: 0.85em;
    margin-top: 10px;
    font-style: italic;
}

.images-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.img-wrapper {
    text-align: center;
}

.img-wrapper img {
    max-width: 100%;
    max-height: 220px;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.scoreboard-container {
    margin: 20px 0;
    text-align: center;
}

.scoreboard-img {
    max-width: 100%;
    max-height: 400px;
}

/* ===== COLUMNS ===== */
.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

/* ===== LISTS ===== */
.clean-list {
    list-style: none;
    padding: 0;
}

.clean-list li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    line-height: 1.6;
}

.clean-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    font-weight: bold;
}

/* ===== CODE BLOCKS ===== */
.code-block {
    background: linear-gradient(135deg, rgba(5, 8, 16, 0.9) 0%, rgba(10, 14, 23, 0.8) 100%);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    overflow-x: auto;
}

.code-block h3 {
    color: var(--primary-blue);
    font-size: 1em;
    margin-bottom: 12px;
    margin-top: 0;
}

.code-block code {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9em;
    line-height: 1.6;
}

.comment {
    color: var(--text-secondary);
    font-style: italic;
}

.keyword {
    color: var(--accent-purple);
    font-weight: 600;
}

.number {
    color: #ffa657;
}

/* ===== BÊTISIER ===== */
.betisier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.betisier-item {
    background: linear-gradient(135deg, rgba(21, 27, 46, 0.6) 0%, rgba(30, 41, 66, 0.4) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}

.betisier-item:hover {
    border-color: var(--border-glow);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.2);
}

.betisier-item.highlight {
    border-color: var(--accent-yellow);
}

.quote {
    color: var(--accent-yellow);
    font-style: italic;
    padding: 12px 0 12px 20px;
    border-left: 3px solid var(--accent-yellow);
    margin: 15px 0;
    display: block;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 0 8px 8px 0;
}

.explain {
    color: var(--text-secondary);
    font-size: 0.95em;
    margin-top: 10px;
}

/* ===== STATS SUMMARY ===== */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    margin: 40px 0;
    padding: 40px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-big {
    display: block;
    font-size: 3.5em;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    margin-bottom: 10px;
}

/* ===== CONTACT INFO ===== */
.contact-info {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
}

.contact-info a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-info a:hover {
    color: var(--secondary-blue);
    text-decoration: underline;
}

/* ===== NAVIGATION ===== */
.navigation {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(21, 27, 46, 0.95) 0%, rgba(15, 24, 41, 0.98) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid var(--border-glow);
    border-radius: 50px;
    padding: 10px 18px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 212, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navigation:hover {
    box-shadow: 
        0 15px 50px rgba(0, 212, 255, 0.4),
        0 0 30px rgba(0, 212, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.nav-btn {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(168, 85, 247, 0.25));
    border: 2px solid rgba(0, 212, 255, 0.4);
    color: var(--primary-blue);
    font-size: 1.2em;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.nav-btn:hover:not(:disabled)::before {
    width: 100%;
    height: 100%;
}

.nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    border-color: var(--primary-blue);
    color: white;
    transform: scale(1.15);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.7);
}

.nav-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(30, 41, 66, 0.3);
    border-color: rgba(148, 163, 184, 0.2);
}

.nav-btn span {
    position: relative;
    z-index: 1;
}

.slide-counter {
    color: var(--primary-blue);
    font-size: 0.95em;
    font-weight: 700;
    min-width: 60px;
    text-align: center;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* ===== PARTNERS ===== */
.partners {
    margin-top: 40px;
}

.partners h3 {
    text-align: center;
    font-size: 1.3em;
    margin-bottom: 20px;
    color: var(--primary-blue);
}

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.partner {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(168, 85, 247, 0.05));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.partner:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(168, 85, 247, 0.1));
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

/* ===== COMPACT BETISIER ===== */
.betisier-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.betisier-item-small {
    background: linear-gradient(135deg, rgba(21, 27, 46, 0.6), rgba(30, 41, 66, 0.4));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s ease;
}

.betisier-item-small:hover {
    transform: translateY(-5px);
    border-color: var(--border-glow);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.betisier-item-small img {
    width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 8px;
}

.betisier-item-small p {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
    line-height: 1.4;
}

/* ===== LARGE BETISIER ===== */
.betisier-grid-large {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 10px auto;
    max-width: 1100px;
}

.betisier-item-large {
    background: linear-gradient(135deg, rgba(21, 27, 46, 0.6), rgba(30, 41, 66, 0.4));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    transition: all 0.3s ease;
    text-align: center;
}

.betisier-item-large:hover {
    transform: translateY(-5px);
    border-color: var(--border-glow);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.betisier-item-large img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
}

.betisier-item-large .quote,
.betisier-item-large p {
    font-size: 1em;
    color: var(--text-secondary);
    margin: 0;
    font-style: italic;
    line-height: 1.5;
}

/* ===== IMAGE ZOOM MODAL ===== */
.zoomable {
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.zoomable:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 95%;
    max-height: 95%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    background: white;
    padding: 20px;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.8); }
    to { transform: translate(-50%, -50%) scale(1); }
}

.close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: var(--primary-blue);
    font-size: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 2001;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
}

.close:hover,
.close:focus {
    color: white;
    transform: scale(1.2) rotate(90deg);
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(21, 27, 46, 0.8);
    z-index: 1001;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--accent-purple) 50%, var(--accent-pink) 100%);
    transition: width 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.8);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .slide {
        padding: 60px 50px 100px;
    }
    
    h1 {
        font-size: 2.8em;
    }
    
    .two-columns {
        grid-template-columns: 1fr;
    }
    
    .betisier-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .slide {
        padding: 40px 25px 100px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .navigation {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
    }
    
    .nav-btn {
        width: 42px;
        height: 42px;
        font-size: 1.2em;
    }
    
    .main-logo {
        max-width: 180px;
    }
}
