/* style.css - UPDATE: FULL WIDTH & LOGO */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap');

:root { 
    --primary: #2c3e50; 
    --accent: #3498db; 
    --accent-hover: #2980b9;
    --danger: #e74c3c; 
    --success: #27ae60; 
    --bg: #f8f9fa; 
    --card-bg: #ffffff;
    --text: #333; 
    --border: #e2e8f0;
    --shadow: 0 5px 20px rgba(0,0,0,0.05);
    --radius: 16px;
}

body { font-family: 'Poppins', sans-serif; background: var(--bg); color: var(--text); margin: 0; padding: 0; overflow-x: hidden; }
* { box-sizing: border-box; }

/* ZMĚNA: max-width změněno na 100% pro roztažení přes celou obrazovku */
.container { width: 100%; padding: 20px 40px; max-width: 100%; margin: 0 auto; }

/* Header */
.header { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 15px 30px; background: #fff; 
    box-shadow: var(--shadow); margin-bottom: 30px; 
    border-radius: var(--radius); border: 1px solid var(--border); 
    flex-wrap: wrap; gap: 20px;
}
.time-display { font-weight: 800; color: var(--primary); font-size: 1.6em; display: block; }
.header-center { text-align: center; flex-grow: 1; }
.header-controls { display: flex; gap: 15px; align-items: center; }
.label-small { font-size: 0.7em; text-transform: uppercase; color: #999; font-weight: 600; letter-spacing: 1px; }

/* Admin Nav */
.admin-bar { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 20px 30px; background: var(--primary); color: white;
    box-shadow: var(--shadow); margin-bottom: 30px; border-radius: var(--radius);
    flex-wrap: wrap; gap: 20px;
}
.admin-brand { font-size: 1.5em; font-weight: 800; margin-right: 30px; }
.admin-menu { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-link { color: rgba(255,255,255,0.7); text-decoration: none; font-weight: 600; padding: 8px 16px; border-radius: 8px; transition: all 0.2s; }
.admin-link:hover, .admin-link.active { background: rgba(255,255,255,0.15); color: white; }
.btn-web { background: var(--accent); color: white; padding: 10px 20px; border-radius: 50px; text-decoration: none; font-weight: 700; font-size: 0.9em; margin-left: auto; }

/* Inputs & Buttons */
.btn { display: inline-block; padding: 12px 25px; border: none; border-radius: 10px; font-weight: 700; font-size: 1em; cursor: pointer; transition: transform 0.2s; text-align: center; text-decoration: none; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.15); }
.btn-primary { background: var(--accent); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-admin { background: #34495e; color: white; padding: 10px 20px; border-radius: 8px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.select-modern { padding: 10px 15px; border: 2px solid #eee; border-radius: 8px; font-family: inherit; font-weight: 600; cursor: pointer; min-width: 200px; background: #fff; }
input:not(.modal-input) { width: 100%; padding: 14px; border: 2px solid var(--border); border-radius: 12px; }

/* --- LAYOUT: VEDLE SEBE (Grid) --- */
.grid-athletes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.athlete-card { background: #fff; border-radius: 20px; overflow: hidden; border: 1px solid #f0f0f0; transition: transform 0.3s; position: relative; }
.athlete-card:hover { transform: translateY(-8px); box-shadow: 0 20px 50px rgba(0,0,0,0.1); }
.athlete-photo-wrapper { position: relative; width: 100%; padding-top: 100%; overflow: hidden; }
.athlete-photo-wrapper img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.athlete-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 20px; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); color: white; opacity: 0; transition: opacity 0.3s; font-weight: bold; text-align: center; }
.athlete-card:hover .athlete-overlay { opacity: 1; }
.athlete-info { padding: 25px; }
.athlete-info h3 { margin: 0 0 20px 0; font-size: 1.5em; font-weight: 800; color: var(--primary); }
.athlete-stats-row { display: flex; justify-content: space-between; margin-bottom: 15px; text-align: center; border-bottom: 1px solid #f9f9f9; padding-bottom: 15px; }
.as-val { display: block; font-size: 1.4em; font-weight: 800; color: var(--primary); }
.as-lbl { font-size: 0.65em; text-transform: uppercase; color: #aaa; font-weight: 700; letter-spacing: 0.5px; margin-top: 5px; }

/* Profil & Carousel */
.profile-card { display: flex; gap: 30px; align-items: center; padding: 30px; background: #fff; border-radius: var(--radius); border: 1px solid #f0f0f0; margin-bottom: 40px; }
.profile-img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 5px solid #f0f0f0; box-shadow: 0 5px 20px rgba(0,0,0,0.1); cursor: pointer; flex-shrink: 0; }
.carousel-container { width: 100%; overflow: hidden; white-space: nowrap; position: relative; margin-bottom: 40px; padding: 10px 0; mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent); }
.carousel-track { display: inline-flex; gap: 30px; animation: scroll 60s linear infinite; padding-left: 30px; }
.carousel-item { height: 250px; width: auto; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); flex-shrink: 0; cursor: pointer; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- CVIKY KARTA --- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 30px; }
.ex-card { background: #fff; border-radius: 20px; overflow: hidden; border: 1px solid #f0f0f0; transition: transform 0.2s; box-shadow: 0 5px 15px rgba(0,0,0,0.03); }
.ex-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.ex-image-wrap { height: 250px; position: relative; cursor: pointer; overflow: hidden; }
.ex-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.ex-image-wrap:hover img { transform: scale(1.05); }
.overlay-disabled { position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(255,255,255,0.7); cursor: not-allowed; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.5em; color: #7f8c8d; backdrop-filter: blur(3px); }

.ex-content { padding: 30px; }
.ex-title { font-size: 1.8em; font-weight: 800; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; color: var(--primary); }

/* STATISTIKY */
.stats-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr 1fr; 
    gap: 10px; 
    margin-bottom: 20px; 
    text-align: center; 
    background: #f8f9fa; 
    padding: 25px 15px; 
    border-radius: 16px; 
}

/* VELKÁ ČÍSLA */
.stat-val { 
    font-size: 3em; 
    font-weight: 800; 
    display: block; 
    color: var(--primary); 
    line-height: 1.1;
    margin-top: 5px;
}
.stat-lbl { 
    font-size: 0.8em; 
    color: #999; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    font-weight: 700; 
}
.stat-rem { color: var(--danger); }

/* VĚTŠÍ PROCENTA */
.remaining-block {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}
.remaining-label {
    font-size: 1.5em;
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 5px;
}
.stat-pct { 
    font-size: 6em; 
    font-weight: 900; 
    color: var(--accent); 
    line-height: 1;
    display: block;
    letter-spacing: -2px;
}

.badge { background: var(--success); color: white; padding: 4px 10px; border-radius: 12px; font-size: 0.7em; font-weight: 600; }

.chart-filters { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 10px; }
.chart-btn { border: none; background: #edf2f7; font-size: 0.85em; padding: 6px 14px; cursor: pointer; border-radius: 8px; font-weight: 600; color: #666; transition: all 0.2s; }
.chart-btn.active { background: var(--primary); color: white; }
.chart-wrapper { height: 150px; margin-top: 15px; position: relative; }

/* Modaly atd. */
.status-indicator { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.9em; padding: 8px 16px; border-radius: 30px; }
.status-active { background: rgba(39, 174, 96, 0.1); color: var(--success); }
.status-inactive { background: rgba(231, 76, 60, 0.1); color: var(--danger); }
.status-dot { width: 14px; height: 14px; border-radius: 50%; background: currentColor; }

#startModal { backdrop-filter: blur(8px); background: rgba(255,255,255,0.6); }
.modal-content { width: 650px !important; padding: 50px !important; border-radius: 30px !important; background: #fff; box-shadow: 0 30px 60px rgba(0,0,0,0.25) !important; }
.modal-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; border-bottom: 1px solid #f0f0f0; padding-bottom: 15px; }
.modal-label { font-size: 1.6em; font-weight: 800; color: #2c3e50; }
.modal-input { width: 140px; padding: 15px; font-size: 1.8em; font-weight: 800; text-align: center; border: 3px solid #eee; border-radius: 16px; outline: none; color: var(--accent); }
.modal-btn-start { width: 100%; font-size: 1.8em; padding: 25px; border-radius: 16px; }

#lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 10000; display: none; align-items: center; justify-content: center; }
#lightbox img { max-width: 95%; max-height: 95%; border: 5px solid white; box-shadow: 0 0 50px black; }
.lightbox-btn { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: none; color: white; font-size: 4em; cursor: pointer; padding: 20px; }
.lb-prev { left: 20px; } .lb-next { right: 20px; }

/* Admin File Upload */
.file-upload-box { border: 2px dashed #cbd5e0; border-radius: 12px; padding: 25px; text-align: center; cursor: pointer; position: relative; background: #f8fafc; }
.file-upload-box input { position: absolute; top:0; left:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.upload-icon { font-size: 2em; display: block; margin-bottom: 5px; }