/* --- style.css --- */

/* 1. ZÁKLADNÍ RESET & PROMĚNNÉ */
* { box-sizing: border-box; } 

:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.85);
    --border-tech: rgba(148, 163, 184, 0.2);
    --primary: #3b82f6;       /* Modrá (Taktika/Plán) */
    --primary-glow: rgba(59, 130, 246, 0.4);
    
    --calc-accent: #a855f7;   /* Fialová (Kalkulačka) */
    --accent-green: #10b981;  /* Zelená */
    --accent-orange: #f97316; /* Oranžová */
    --accent-red: #ef4444;    /* Červená */
    
    --text-main: #f1f5f9; 
    --text-muted: #94a3b8;
    --tech-font: 'Exo 2', sans-serif;
    --body-font: 'Inter', sans-serif;
}

body {
    font-family: var(--body-font); 
    background: #020617 url('bg.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-main); 
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    min-height: 100vh; margin: 0; padding: 20px 10px;
}

/* 2. KARTA (CARD) DESIGN */
.card {
    background: var(--bg-card); 
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-tech); 
    border-top: 1px solid rgba(255,255,255,0.15);
    border-radius: 24px; 
    padding: 0; 
    width: 100%; max-width: 550px; /* Univerzální šířka */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    position: relative; overflow: hidden;
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    margin-bottom: 30px;
}

/* Mřížka na pozadí karty */
.card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(var(--border-tech) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-tech) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.15; pointer-events: none; z-index: 0;
}

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

/* 3. HLAVIČKA (HEADER) */
.app-header {
    padding: 35px 25px 20px 25px; text-align: center; position: relative; z-index: 2;
}
.app-logo { 
    display: block; margin: 0 auto 5px auto; max-width: 150px; height: auto; 
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.4)); 
}
h1 { 
    font-family: var(--tech-font); margin: 0; font-size: 2rem; font-weight: 800; 
    color: white; text-transform: uppercase; letter-spacing: 1px;
    background: linear-gradient(to bottom, #fff, #cbd5e1); 
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.slogan { 
    font-family: var(--tech-font); font-size: 0.8rem; color: var(--primary); 
    text-transform: uppercase; letter-spacing: 3px; margin-top: 5px; opacity: 0.9; 
    font-weight: 600; text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* 4. STATUS BAR & NAVIGACE */
.status-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 25px; background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid var(--border-tech);
    font-family: var(--tech-font); font-size: 0.7rem; letter-spacing: 1px;
    text-transform: uppercase; color: var(--text-muted); position: relative; z-index: 2;
}
.status-left { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.status-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 8px var(--primary); }

.lang-switch, .lang-float { display: flex; gap: 10px; font-family: var(--tech-font); font-weight: 700; font-size: 0.8rem;}
.lang-float { position: absolute; top: 20px; right: 20px; z-index: 10; }
.lang-opt, .l-opt { cursor: pointer; opacity: 0.5; transition: 0.3s; color: white; }
.lang-opt:hover, .lang-opt.active, .l-opt:hover, .l-opt.active { opacity: 1; color: var(--primary); text-shadow: 0 0 10px var(--primary-glow); }

.back-btn { 
    position: absolute; top: 15px; left: 20px; text-decoration: none; 
    color: var(--text-muted); font-size: 1.5rem; font-weight: bold; z-index: 10; transition:0.3s;
}
.back-btn:hover { color: white; transform: translateX(-3px); }

/* 5. VSTUPY A FORMULÁŘE */
.content-wrap { padding: 0 30px 40px 30px; position: relative; z-index: 2; }
.input-group, .section-box { margin-bottom: 15px; position: relative; }

.section-label, .label { 
    display: flex; justify-content: space-between;
    color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; 
    font-weight: 700; letter-spacing: 1.2px; margin-bottom: 8px; font-family: var(--tech-font); 
    margin-top: 15px;
}

input, select {
    width: 100%; background: rgba(0,0,0,0.4); 
    border: 1px solid var(--border-tech); 
    padding: 18px; border-radius: 14px; 
    color: white; font-family: var(--tech-font); 
    font-size: 1.4rem; text-align: center; font-weight: 700; 
    outline: none; transition: 0.3s; appearance: none;
}
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 20px rgba(59, 130, 246, 0.25); background: rgba(0,0,0,0.6); }

/* 6. TLAČÍTKA A PŘEPÍNAČE */
.btn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.btn-option { 
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-tech); 
    color: var(--text-muted); padding: 12px 5px; border-radius: 10px; 
    font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: 0.2s; 
    text-align: center; font-family: var(--tech-font);
}
.btn-option:hover { background: rgba(255,255,255,0.07); color: white; }
.btn-option.active { background: rgba(59, 130, 246, 0.15); color: var(--primary); border-color: var(--primary); box-shadow: 0 0 10px rgba(59, 130, 246, 0.1); }

.dist-switch { 
    display: flex; background: rgba(0,0,0,0.3); 
    border: 1px solid var(--border-tech); border-radius: 14px; 
    overflow: hidden; margin-bottom: 25px; 
}
.dist-opt { 
    flex: 1; padding: 16px; text-align: center; cursor: pointer; 
    color: var(--text-muted); font-weight: 700; font-family: var(--tech-font); 
    transition: 0.3s; font-size: 1rem; border-right: 1px solid rgba(255,255,255,0.05);
}
.dist-opt:last-child { border-right: none; }
.dist-opt.active { background: rgba(59, 130, 246, 0.2); color: white; box-shadow: inset 0 -3px 0 var(--primary); }

.action-btn, .start-btn {
    margin-top: 10px; 
    width: 100%; 
    padding: 20px;
    /* Modrý gradient */
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none; 
    border-radius: 16px;
    color: white; 
    font-family: var(--tech-font); 
    font-size: 1.1rem; 
    font-weight: 800;
    cursor: pointer; 
    transition: 0.3s; 
    text-transform: uppercase; 
    letter-spacing: 2px;
    /* Modrý stín a jemný rámeček nahoře */
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.4); 
    border-top: 1px solid rgba(255,255,255,0.2);
    
    /* Důležité pro oříznutí animace uvnitř tlačítka */
    position: relative; 
    overflow: hidden; 
}
/* Ten "superhustý" odlesk (Shimmer) */
.action-btn::after {
    content: ''; 
    position: absolute; 
    top: -50%; 
    left: -50%; 
    width: 200%; 
    height: 200%;
    /* Průhledný bílý pruh */
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
    transform: rotate(45deg); 
    /* Samotná animace - 3 vteřiny, nekonečná smyčka */
    animation: shimmer 3s infinite;
}

/* Definice pohybu odlesku */
@keyframes shimmer {
    0% { transform: translateX(-150%) rotate(45deg); }
    100% { transform: translateX(150%) rotate(45deg); }
}

/* Hover efekty */
.action-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.6); 
}

.action-btn:active { 
    transform: scale(0.98); 
}
.start-btn:hover { transform: translateY(-2px); }
.start-btn:active { transform: scale(0.98); }

/* 7. MENU GRID (PRO INDEX.HTML) */
.menu-grid { display: grid; grid-template-columns: 1fr; gap: 20px; width: 100%; max-width: 600px; padding: 0 10px; }
@media (min-width: 600px) { 
    .menu-grid { grid-template-columns: 1fr 1fr; } 
    .menu-tile:last-child:nth-child(odd) { grid-column: span 2; }
}
.menu-tile {
    background: var(--bg-card); backdrop-filter: blur(20px);
    border: 1px solid var(--border-tech); border-radius: 20px; padding: 25px;
    text-decoration: none; color: var(--text-main); position: relative; overflow: hidden;
    transition: 0.3s; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5); cursor: pointer;
    opacity: 0; animation: fadeInUp 0.6s forwards;
}
.menu-tile:hover { transform: translateY(-5px); border-color: var(--primary); background: rgba(30, 41, 59, 0.95); }
.tile-icon { font-size: 3rem; margin-bottom: 15px; filter: drop-shadow(0 0 15px rgba(255,255,255,0.1)); }
.tile-title { font-family: var(--tech-font); font-size: 1.2rem; font-weight: 700; text-transform: uppercase; color: white; margin-bottom: 8px;}
.tile-desc { font-size: 0.8rem; color: var(--text-muted); }

/* Animace dlaždic */
.menu-tile:nth-child(1) { animation-delay: 0.1s; }
.menu-tile:nth-child(2) { animation-delay: 0.2s; }
.menu-tile:nth-child(3) { animation-delay: 0.3s; }
.menu-tile:nth-child(4) { animation-delay: 0.4s; }
.menu-tile:nth-child(5) { animation-delay: 0.5s; }

/* 8. PATIČKA & HELPERS */
.app-footer, .hub-footer {
    text-align: center; padding-top: 15px; margin-top: 20px;padding-bottom: 15px;
    border-top: 1px dashed var(--border-tech); color: var(--text-muted);
    font-size: 0.65rem; font-family: var(--tech-font); letter-spacing: 1px; text-transform: uppercase;
}
.f-ver { color: var(--primary); font-weight: 700; text-shadow: 0 0 10px var(--primary-glow); }
.hidden { display: none !important; }
.arrow-separator { text-align: center; color: var(--text-muted); opacity: 0.3; font-size: 1.2rem; margin: -5px 0 10px 0; font-weight: bold; }


/* --- SPECIFICKÉ STYLY PRO TAKTIKU (které nejsou v style.css) --- */
        
        /* Barvy status baru pro taktiku */
        .status-dot { background: var(--accent-green); box-shadow: 0 0 8px var(--accent-green); }
        .lang-opt:hover, .lang-opt.active { color: var(--primary); text-shadow: 0 0 10px var(--primary-glow); }

        /* Profil Switch */
        .profile-switch-container {
            display: flex; background: rgba(0,0,0,0.4); border-radius: 14px; border: 1px solid var(--border-tech); overflow: hidden;
        }
        .gender-opt { 
            flex: 1; padding: 14px; text-align: center; font-size: 0.9rem; cursor: pointer; 
            color: var(--text-muted); font-weight: 600; transition: 0.3s; border-right: 1px solid var(--border-tech);
            font-family: var(--tech-font);
        }
        .gender-opt:last-child { border-right: none; }
        .gender-opt:hover { background: rgba(255,255,255,0.03); }
        .gender-opt.active { 
            background: rgba(255,255,255,0.1); color: white; 
            box-shadow: inset 0 -3px 0 var(--primary);
        }
        .gender-icon { display: inline-block; font-size: 1.1rem; margin-right: 5px; vertical-align: middle; }

        /* Specifické barvy tlačítek strategií */
        .btn-strat-con.active { color: var(--accent-green); border-color: var(--accent-green); background: rgba(16, 185, 129, 0.15); box-shadow: 0 0 15px rgba(16, 185, 129, 0.15); }
        .btn-strat-bold.active { color: var(--accent-orange); border-color: var(--accent-orange); background: rgba(249, 115, 22, 0.15); box-shadow: 0 0 15px rgba(249, 115, 22, 0.15); }
        .neffe-btn { grid-column: span 3; color: #fca5a5; display: none; border-color: rgba(239, 68, 68, 0.3); }
        .neffe-btn.active { background: rgba(239, 68, 68, 0.2); color: #ef4444; border-color: #ef4444; box-shadow: 0 0 15px rgba(239, 68, 68, 0.2); }

        /* Info box */
        .info-box { 
            background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(59, 130, 246, 0.3); 
            border-left: 3px solid var(--primary); border-radius: 10px; padding: 15px; 
            margin-top: 15px; font-size: 0.85rem; color: #cbd5e1; line-height: 1.5; 
        }

        /* Výsledky a zvířata */
        .result-area { margin-top: 30px; border-top: 2px dashed var(--border-tech); padding-top: 25px; display: none; animation: fadeInUp 0.5s ease forwards; }
        .animal-badge { 
            background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)); 
            border-radius: 16px; padding: 20px; margin-bottom: 15px; 
            display: flex; align-items: center; justify-content: space-between; 
            border: 1px solid var(--border-tech); position: relative; 
        }
        .animal-icon { font-size: 3.5rem; margin-right: 20px; filter: drop-shadow(0 0 15px rgba(255,255,255,0.1)); }
        .animal-info { text-align: left; flex: 1; }
        .animal-title { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 1px; margin-bottom: 4px;}
        .animal-name { font-size: 1.5rem; font-family: var(--tech-font); font-weight: 800; color: #fcd34d; text-shadow: 0 0 15px rgba(252, 211, 77, 0.3); }
        .animal-watts { text-align: right; }
        .watt-val { font-size: 1.8rem; font-weight: 800; color: #fff; font-family: var(--tech-font); line-height: 1; }
        .watt-lbl { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; margin-top: 2px;}
        
        .legend-toggle { 
            position: absolute; top: 10px; right: 10px; font-size: 0.7rem; color: var(--primary); 
            cursor: pointer; border: 1px solid rgba(59, 130, 246, 0.5); border-radius: 50%; 
            width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; opacity: 0.8; transition: 0.2s;
        }
        .legend-toggle:hover { background: var(--primary); color: white; }

        .animal-legend { display: none; background: rgba(0,0,0,0.6); border-radius: 12px; padding: 15px; margin-bottom: 20px; font-size: 0.8rem; border: 1px solid var(--border-tech); }
        .legend-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }

        /* Graf závodu */
        .race-track-container { margin: 25px 0; }
        .race-track { display: flex; height: 35px; border-radius: 6px; overflow: hidden; margin-bottom: 8px; border: 1px solid rgba(255,255,255,0.1); }
        .track-seg { display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,0.5); color: white; position: relative; }
        .track-labels { display: flex; position: relative; height: 30px; }
        .lbl-wrap { text-align: center; position: relative; }
        .lbl-txt { position: absolute; left: 50%; transform: translateX(-50%); font-size: 0.65rem; color: var(--text-muted); width: max-content; font-family: var(--tech-font); text-transform: uppercase; letter-spacing: 0.5px; }
        .lbl-wrap:nth-child(even) .lbl-txt { top: 14px; }

        .strat-list { display: flex; flex-direction: column; gap: 8px; }
        .strat-row { display: flex; justify-content: space-between; padding: 15px 18px; background: rgba(255,255,255,0.02); border-radius: 10px; border-left: 4px solid #555; align-items: center; }
        .s-dist { font-size: 0.9rem; font-weight: 600; color: #e2e8f0; }
        .s-val { font-family: var(--tech-font); font-weight: 700; font-size: 1.2rem; }

        .print-btn { 
            background: transparent; color: var(--text-muted); width: 100%; border: 1px dashed var(--border-tech); 
            padding: 15px; border-radius: 14px; margin-top: 15px; cursor: pointer; font-weight: 600; 
            display: flex; align-items: center; justify-content: center; gap: 10px; transition: 0.2s; font-size: 0.9rem;
        }
        .print-btn:hover { background: rgba(255, 255, 255, 0.05); color: white; border-color: white; }

        .alert-box { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; padding: 15px; border-radius: 12px; margin-top: 20px; font-size: 0.9rem; display: none; text-align: center; font-weight: 500;}

        /* TISK */
        #print-card-area { display: none; }
        @media print {
            body * { visibility: hidden; }
            #print-card-area, #print-card-area * { visibility: visible; }
            body { background: white; color: black; padding: 0; margin: 0; display: block; }
            #print-card-area { position: absolute; left: 0; top: 0; width: 100%; padding: 20px; display: flex; flex-direction: column; align-items: center; }
            .tape-card { border: 4px solid black; width: 300px; font-family: 'Exo 2', sans-serif; text-align: center; }
            .tape-header { background: black; color: white; padding: 10px; font-size: 1.5rem; font-weight: 800; }
            .tape-row { display: flex; justify-content: space-between; padding: 8px 15px; border-bottom: 2px solid #ccc; font-size: 1.2rem; font-weight: 700; }
            .tape-row:last-child { border-bottom: none; }
            .tape-note { font-size: 0.8rem; padding: 5px; font-style: italic; }
        }