/* LiveScore Pro 2026 v3.0 - Complete Stylesheet */

/* ==================== VARIABLES ==================== */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2332;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.5);
    --accent-primary: #00e676;
    --accent-secondary: #00bfa5;
    --accent-danger: #ff5252;
    --accent-warning: #ffc107;
    --border-color: rgba(255, 255, 255, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 50%;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 230, 118, 0.3);
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s ease;
}

/* ==================== RESET & BASE ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.5; min-height: 100vh; overflow-x: hidden; }
#app { min-height: 100vh; display: flex; flex-direction: column; }
img { max-width: 100%; height: auto; }
button { font-family: inherit; }

/* ==================== TYPOGRAPHY ==================== */
.app-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: 3px; background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-title { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }

/* ==================== BUTTONS ==================== */
.btn { padding: 0.5rem 1rem; border: none; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; transition: all var(--transition-smooth); display: inline-flex; align-items: center; justify-content: center; gap: 0.25rem; text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); color: var(--bg-primary); }
.btn-primary:hover:not(:disabled) { box-shadow: var(--shadow-glow); }
.btn-primary:active { transform: scale(0.95); }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover:not(:disabled) { border-color: var(--accent-primary); }
.btn-danger { background: var(--accent-danger); color: white; }
.btn-danger:hover:not(:disabled) { background: #ff6b6b; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.65rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-full); font-size: 1.1rem; }
.btn-full { width: 100%; }

/* ==================== FORMS ==================== */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.35rem; }
.form-input { width: 100%; padding: 0.6rem 0.75rem; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.85rem; transition: border-color var(--transition-fast); }
.form-input:focus { outline: none; border-color: var(--accent-primary); }
.form-input::placeholder { color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.input-with-button { display: flex; gap: 0.5rem; }
.input-with-button .form-input { flex: 1; }
.error-message { color: var(--accent-danger); font-size: 0.75rem; margin-top: 0.5rem; }

/* ==================== LOGIN PAGE ==================== */
.login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary)); }
.login-card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 2rem; width: 100%; max-width: 360px; box-shadow: var(--shadow-lg); text-align: center; }
.login-card h2 { font-size: 1rem; color: var(--text-secondary); margin: 1rem 0 1.5rem; }
.login-card .app-title { font-size: 2rem; }

/* ==================== FRONTPAGE ==================== */
.frontpage-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); }
.frontpage-main { flex: 1; padding: 1rem; max-width: 600px; margin: 0 auto; width: 100%; }
.admin-badge { background: var(--accent-primary); color: var(--bg-primary); padding: 0.25rem 0.5rem; border-radius: var(--radius-sm); font-size: 0.6rem; font-weight: 700; text-transform: uppercase; }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }

/* Filter Bar */
.filter-bar { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filter-select { padding: 0.5rem 0.75rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.8rem; flex: 1; min-width: 150px; }

/* Match Sections */
.match-section { margin-bottom: 1.5rem; }
.match-list { display: flex; flex-direction: column; gap: 0.75rem; }

/* Live Dot Animation */
.live-dot { width: 8px; height: 8px; background: var(--accent-danger); border-radius: 50%; animation: pulse-dot 1.5s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }

/* Match Card */
.match-card { background: var(--bg-card); border-radius: var(--radius-md); padding: 0.75rem; cursor: pointer; transition: all var(--transition-smooth); border: 1px solid var(--border-color); position: relative; }
.match-card:hover { border-color: var(--accent-primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.match-card.live { border-color: var(--accent-danger); background: linear-gradient(135deg, var(--bg-card), rgba(255, 82, 82, 0.1)); }
.match-card.halftime { border-color: var(--accent-warning); }
.match-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.tournament-badge { font-size: 0.55rem; background: var(--bg-secondary); padding: 0.2rem 0.4rem; border-radius: var(--radius-sm); color: var(--text-muted); }
.match-status { font-size: 0.65rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: var(--radius-sm); }
.match-status.live { background: var(--accent-danger); color: white; animation: pulse-status 1.5s infinite; }
.match-status.halftime { background: var(--accent-warning); color: var(--bg-primary); }
.match-status.finished { background: var(--text-muted); color: var(--bg-primary); }
.match-status.scheduled { background: var(--bg-secondary); color: var(--text-secondary); }
@keyframes pulse-status { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

.match-card-teams { display: flex; flex-direction: column; gap: 0.35rem; }
.team-row { display: flex; align-items: center; gap: 0.5rem; }
.team-badge-mini { width: 24px; height: 24px; background: var(--bg-secondary); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 0.5rem; font-weight: 700; color: var(--accent-primary); overflow: hidden; flex-shrink: 0; }
.team-badge-mini img { width: 100%; height: 100%; object-fit: contain; }
.team-row .team-name { flex: 1; font-size: 0.8rem; font-weight: 500; }
.team-row .team-score { font-family: 'Bebas Neue', sans-serif; font-size: 1.25rem; min-width: 1.5ch; text-align: right; }
.team-row .team-score.winner { color: var(--accent-primary); }

.match-card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.6rem; color: var(--text-muted); margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border-color); gap: 0.5rem; }
.card-edit-btn { background: rgba(100,181,246,0.2); border: none; font-size: 0.75rem; cursor: pointer; opacity: 0; transition: opacity var(--transition-fast); padding: 2px 6px; border-radius: 4px; }
.match-card:hover .card-edit-btn { opacity: 0.8; }
.card-edit-btn:hover { opacity: 1 !important; background: rgba(100,181,246,0.4); }
.card-delete-btn { background: rgba(255,82,82,0.2); border: none; font-size: 0.75rem; cursor: pointer; opacity: 0; transition: opacity var(--transition-fast); padding: 2px 6px; border-radius: 4px; }
.match-card:hover .card-delete-btn { opacity: 0.8; }
.card-delete-btn:hover { opacity: 1 !important; background: rgba(255,82,82,0.4); }

/* Empty State */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state p { margin-bottom: 1rem; }
.empty-text { color: var(--text-muted); font-size: 0.8rem; text-align: center; padding: 1rem; }

/* ==================== MODALS ==================== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1rem; }
.modal { background: var(--bg-card); border-radius: var(--radius-lg); width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-sm { max-width: 320px; }
.modal-lg { max-width: 720px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-bottom: 1px solid var(--border-color); }
.modal-header h3 { font-size: 1rem; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 1.25rem; color: var(--text-muted); cursor: pointer; padding: 0.25rem; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 1rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 1rem; border-top: 1px solid var(--border-color); }

/* Tournament List */
.tournament-list { margin-top: 1rem; }
.tournament-list h4 { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.tournament-item { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); }

/* Video Modal */
.video-modal { max-width: 640px; }
.video-container { padding: 0; }
.video-container video { width: 100%; border-radius: 0; }
.video-selector { display: flex; gap: 0.5rem; padding: 1rem; justify-content: center; }

/* ==================== MATCH PAGE HEADER ==================== */
.app-header { background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card)); padding: 0.75rem 1rem 0.5rem; border-bottom: 1px solid var(--border-color); }
.header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }

/* Clock Section */
.clock-section { display: flex; justify-content: center; padding-bottom: 0.5rem; }
.match-clock { display: flex; flex-direction: column; align-items: center; }
.clock-time { font-family: 'Bebas Neue', sans-serif; font-size: 2.5rem; letter-spacing: 2px; color: var(--accent-primary); text-shadow: var(--shadow-glow); line-height: 1; min-width: 120px; text-align: center; font-variant-numeric: tabular-nums; }
.clock-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 0.35rem; }
.clock-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.clock-controls .btn { padding: 0.4rem 0.6rem; font-size: 0.65rem; }

/* ==================== STICKY SCOREBOARD ==================== */
.sticky-scoreboard { position: sticky; top: 0; z-index: 100; background: var(--bg-card); border-bottom: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4); }
.scoreboard-compact { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.75rem; }
.team-side { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; cursor: pointer; flex: 1; }
.team-side.home { align-items: center; }
.team-side.away { align-items: center; }
.team-badge-sm { width: 36px; height: 36px; background: var(--bg-secondary); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.1); overflow: hidden; flex-shrink: 0; }
.team-badge-sm img { width: 85%; height: 85%; object-fit: contain; }
.team-badge-sm .badge-initials { font-size: 0.75rem; font-weight: 700; color: var(--accent-primary); }
.team-name-sm { font-size: 0.6rem; font-weight: 600; text-transform: uppercase; color: var(--text-secondary); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }

.score-center-sticky { display: flex; flex-direction: column; align-items: center; padding: 0 0.75rem; flex-shrink: 0; }
.score-row { display: flex; align-items: center; gap: 0.25rem; }
.score-num { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; font-variant-numeric: tabular-nums; line-height: 1; }
.score-num.my-team { color: var(--accent-primary); }
.score-num.opponent { color: var(--text-secondary); }
.score-num.home { color: var(--accent-primary); }
.score-num.away { color: var(--text-secondary); }
.score-sep { font-family: 'Bebas Neue', sans-serif; font-size: 1.25rem; color: var(--text-muted); }
.score-time { font-size: 0.6rem; color: var(--accent-primary); font-variant-numeric: tabular-nums; font-weight: 600; margin-top: 0.1rem; }
.status-badge { font-size: 0.5rem; padding: 0.15rem 0.4rem; border-radius: var(--radius-sm); margin-top: 0.25rem; font-weight: 600; text-transform: uppercase; }
.status-badge.finished { background: var(--text-muted); color: var(--bg-primary); }
.status-badge.halftime { background: var(--accent-warning); color: var(--bg-primary); }

.away-goal-btn-sm { padding: 0.25rem 0.5rem; font-size: 0.55rem; font-weight: 600; background: var(--accent-danger); border: none; border-radius: var(--radius-sm); color: white; cursor: pointer; white-space: nowrap; margin-top: 0.25rem; flex-shrink: 0; }
.away-goal-btn-sm:active { transform: scale(0.95); }
.home-goal-btn-sm { padding: 0.25rem 0.5rem; font-size: 0.55rem; font-weight: 600; background: var(--accent-primary); border: none; border-radius: var(--radius-sm); color: var(--bg-primary); cursor: pointer; white-space: nowrap; margin-top: 0.25rem; flex-shrink: 0; }
.home-goal-btn-sm:active { transform: scale(0.95); }

/* ==================== MAIN CONTENT ==================== */
.main-content { flex: 1; display: flex; flex-direction: column; padding: 0.75rem; gap: 0.75rem; max-width: 600px; margin: 0 auto; width: 100%; }

/* ==================== PITCH ==================== */
.pitch-section { display: flex; flex-direction: column; gap: 0.75rem; }
.pitch-container { background: linear-gradient(180deg, #1b5e20, #2e7d32, #1b5e20); border-radius: var(--radius-lg); padding: 0.75rem; position: relative; min-height: 300px; overflow: hidden; box-shadow: var(--shadow-lg), inset 0 0 60px rgba(0, 0, 0, 0.3); }
.pitch-markings { position: absolute; inset: 0; pointer-events: none; }
.center-line { position: absolute; top: 50%; left: 10%; right: 10%; height: 2px; background: rgba(255, 255, 255, 0.2); transform: translateY(-50%); }
.center-circle { position: absolute; top: 50%; left: 50%; width: 50px; height: 50px; border: 2px solid rgba(255, 255, 255, 0.2); border-radius: 50%; transform: translate(-50%, -50%); }
.penalty-area { position: absolute; bottom: 0; left: 50%; width: 45%; height: 18%; border: 2px solid rgba(255, 255, 255, 0.15); border-bottom: none; transform: translateX(-50%); border-radius: 4px 4px 0 0; }

.pitch-formation { display: flex; flex-direction: column; gap: 0.35rem; height: 100%; min-height: 280px; padding: 0.25rem 0; position: relative; z-index: 1; }
.formation-row { display: flex; justify-content: center; gap: 0.35rem; flex: 1; align-items: center; }

.pitch-slot { width: 65px; min-width: 55px; max-width: 75px; height: 75px; background: rgba(0, 0, 0, 0.15); border: 2px dashed rgba(255, 255, 255, 0.25); border-radius: var(--radius-md); display: flex; flex-direction: column; align-items: center; justify-content: center; transition: all 0.2s ease; cursor: pointer; position: relative; }
.pitch-slot.empty { opacity: 0.7; }
.pitch-slot.empty:hover { background: rgba(0, 230, 118, 0.2); border-color: rgba(0, 230, 118, 0.5); opacity: 1; }
.pitch-slot.filled { border-style: solid; border-color: rgba(0, 230, 118, 0.4); background: rgba(0, 230, 118, 0.1); }
.pitch-slot.drag-over { border-color: var(--accent-primary) !important; background: rgba(0, 230, 118, 0.35) !important; transform: scale(1.08); box-shadow: 0 0 25px rgba(0, 230, 118, 0.6), 0 0 50px rgba(0, 230, 118, 0.3); }

.slot-position { font-size: 0.5rem; font-weight: 700; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.slot-number { font-family: 'Bebas Neue', sans-serif; font-size: 1rem; color: rgba(255, 255, 255, 0.2); }

/* Pitch Player */
.pitch-player { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0.15rem; gap: 1px; cursor: pointer; border-radius: var(--radius-md); transition: all 0.15s ease; position: relative; }
.pitch-player:hover { background: rgba(255, 215, 0, 0.2); }
.pitch-player:hover .player-avatar { box-shadow: 0 0 15px rgba(255, 215, 0, 0.7), 0 4px 12px rgba(0, 0, 0, 0.4); background: linear-gradient(135deg, #ffd700, #ffaa00); transform: scale(1.05); }
.pitch-player.dragging { opacity: 0.3; transform: scale(0.85); }
.pitch-player.sent-off { opacity: 0.4; }

.player-position { font-size: 0.45rem; font-weight: 700; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.player-avatar { width: 26px; height: 26px; background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; font-family: 'Bebas Neue', sans-serif; font-size: 0.75rem; color: var(--bg-primary); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); transition: all 0.15s ease; position: relative; }
.player-name-tag { font-size: 0.5rem; font-weight: 600; color: white; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); text-align: center; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-time { font-size: 0.4rem; color: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums; }
.player-goals { font-size: 0.5rem; margin-top: -2px; }

/* Card Indicators */
.card-indicator { position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; border-radius: 2px; font-size: 0.5rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.card-indicator.yellow { background: var(--accent-warning); color: var(--bg-primary); }
.card-indicator.red { background: var(--accent-danger); color: white; }

/* Trash Zone */
.trash-zone { position: absolute; bottom: 0.5rem; right: 0.5rem; width: 40px; height: 40px; background: rgba(255, 82, 82, 0.2); border: 2px dashed rgba(255, 82, 82, 0.5); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; opacity: 0.5; transition: all 0.2s ease; z-index: 10; }
.trash-zone.drag-over, body.is-dragging .trash-zone { opacity: 1; background: rgba(255, 82, 82, 0.4); border-color: var(--accent-danger); transform: scale(1.1); }

/* Card Zones */
.card-zone { position: absolute; width: 32px; height: 32px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1rem; cursor: grab; opacity: 0.7; transition: all 0.2s ease; z-index: 10; }
.card-zone:hover { opacity: 1; transform: scale(1.1); }
.yellow-card-zone { bottom: 0.5rem; left: 0.5rem; background: rgba(255, 193, 7, 0.3); border: 1px solid rgba(255, 193, 7, 0.5); }
.red-card-zone { bottom: 0.5rem; left: 3rem; background: rgba(255, 82, 82, 0.3); border: 1px solid rgba(255, 82, 82, 0.5); }
.card-zone:active { cursor: grabbing; }
.pitch-slot.card-drop-yellow { border-color: #ffc107 !important; background: rgba(255, 193, 7, 0.2) !important; }
.pitch-slot.card-drop-red { border-color: #ff5252 !important; background: rgba(255, 82, 82, 0.2) !important; }

/* Match Config */
.match-config { display: flex; justify-content: center; gap: 1rem; padding: 0.5rem 1rem; background: var(--bg-secondary); border-radius: var(--radius-md); }
.config-row { display: flex; align-items: center; gap: 0.4rem; }
.config-label { font-size: 0.6rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }
.config-select { background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius-sm); padding: 0.35rem 0.5rem; color: var(--text-primary); font-size: 0.75rem; cursor: pointer; }
.config-select:disabled { opacity: 0.5; cursor: not-allowed; }
.config-select:focus { outline: none; border-color: var(--accent-primary); }

/* ==================== BENCH ==================== */
.bench-section { background: var(--bg-card); border-radius: var(--radius-lg); padding: 0.75rem; }
.bench-grid { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; max-height: 200px; overflow-y: auto; }
.bench-player { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; background: var(--bg-secondary); border-radius: var(--radius-md); cursor: grab; transition: all var(--transition-fast); }
.bench-player:hover { background: rgba(0, 230, 118, 0.1); }
.bench-player.dragging { opacity: 0.5; transform: scale(0.95); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4); }
.bench-player.sent-off { opacity: 0.5; cursor: not-allowed; background: rgba(255, 82, 82, 0.1); }
.bench-avatar { width: 32px; height: 32px; background: var(--bg-card); border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; font-family: 'Bebas Neue', sans-serif; font-size: 0.85rem; color: var(--accent-primary); position: relative; flex-shrink: 0; }
.bench-info { flex: 1; min-width: 0; }
.bench-name { font-size: 0.75rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bench-stats { font-size: 0.6rem; color: var(--text-muted); }
.bench-remove { background: none; border: none; color: var(--text-muted); font-size: 0.9rem; cursor: pointer; padding: 0.25rem; opacity: 0; transition: opacity var(--transition-fast); }
.bench-player:hover .bench-remove { opacity: 1; }
.bench-remove:hover { color: var(--accent-danger); }

/* Drag states */
body.is-dragging .pitch-slot.empty { animation: pulse-slot 1s infinite; }
@keyframes pulse-slot { 0%, 100% { border-color: rgba(255, 255, 255, 0.25); } 50% { border-color: rgba(0, 230, 118, 0.5); } }

/* ==================== MATCH LOG ==================== */
.log-section { background: var(--bg-card); border-radius: var(--radius-lg); padding: 0.75rem; }
.match-log { display: flex; flex-direction: column; gap: 0.5rem; max-height: 300px; overflow-y: auto; }
.log-entry { display: flex; gap: 0.75rem; padding: 0.5rem; background: var(--bg-secondary); border-radius: var(--radius-md); border-left: 3px solid var(--border-color); }
.log-entry.goal-entry { border-left-color: var(--accent-primary); background: rgba(0, 230, 118, 0.1); }
.log-entry.card-entry.yellow { border-left-color: var(--accent-warning); }
.log-entry.card-entry.red { border-left-color: var(--accent-danger); }
.log-entry.sub-entry { border-left-color: #2196f3; }
.log-entry.period-entry { border-left-color: var(--text-muted); background: var(--bg-card); }
.log-time { font-size: 0.65rem; font-weight: 600; color: var(--text-muted); min-width: 50px; font-variant-numeric: tabular-nums; }
.log-content { flex: 1; font-size: 0.75rem; }
.log-content .sub-in { color: var(--accent-primary); display: block; }
.log-content .sub-in::before { content: '↑ '; }
.log-content .sub-out { color: var(--accent-danger); display: block; }
.log-content .sub-out::before { content: '↓ '; }
.goal-actions { display: flex; gap: 0.35rem; margin-top: 0.35rem; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
    .form-row { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; }
    .filter-bar .btn { flex: 1; }
    .clock-controls { gap: 0.35rem; }
    .clock-controls .btn { padding: 0.35rem 0.5rem; font-size: 0.6rem; }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: var(--bg-card); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ==================== TOURNAMENT GROUPS ==================== */
.tournament-group { margin-bottom: 1rem; }
.tournament-header { font-size: 0.75rem; font-weight: 600; color: rgba(255, 255, 255, 0.6); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.5rem; padding-left: 0.25rem; border-left: 2px solid var(--accent-primary); display: flex; align-items: center; gap: 0.5rem; }
.tournament-header-link { color: var(--accent-primary); text-decoration: none; font-size: 0.85rem; transition: transform 0.2s; }
.tournament-header-link:hover { transform: scale(1.2); }

/* ==================== LOG ACTIONS ==================== */
.log-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.log-actions .btn { flex: 1; font-size: 0.7rem; }

/* Tournament bar in scoreboard */
.tournament-bar {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent));
    color: white;
    text-align: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* My team indicator */
.team-side.my-team .team-name-sm {
    color: var(--accent);
}
.team-side.my-team .team-badge-sm {
    box-shadow: 0 0 0 2px var(--accent);
}

/* Card menu button */
.btn-warning {
    background: #f9a825;
    color: #000;
}
.btn-warning:hover {
    background: #f57f17;
}

/* Card menu */
.card-menu button {
    min-width: 140px;
}

/* Mobile card section */
.mobile-card-section {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
    padding: 0.5rem;
}

@media (min-width: 768px) {
    .mobile-card-section {
        display: none;
    }
}

/* Player selector for cards */
.player-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

.player-selector-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.player-selector-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent);
}

.player-selector-btn .player-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.player-selector-btn .player-name {
    font-size: 0.8rem;
    color: var(--text);
}

.player-selector-btn .card-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
}

/* My Team Toggle Buttons */
.my-team-toggle {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.team-toggle-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.team-toggle-btn.active {
    background: rgba(100, 181, 246, 0.3);
    color: #64b5f6;
    font-weight: 600;
    border: 2px solid #64b5f6;
}

.team-toggle-btn:hover:not(.active) {
    background: var(--bg-card);
}

/* My Team Mark */
.my-team-highlight {
    background: rgba(100, 181, 246, 0.25) !important;
    border: 2px solid rgba(100, 181, 246, 0.6) !important;
    border-radius: 8px;
}

.my-team-label {
    color: #64b5f6;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-top: 2px;
}

/* Video Badge on Match Card */
.video-badge {
    background: rgba(255,193,7,0.2);
    color: #ffc107;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Latest Video Section */
.latest-video-section {
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.latest-video-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.video-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.video-match {
    color: var(--text);
    font-weight: 600;
}

.video-goal {
    color: var(--accent);
}

.latest-video-player {
    width: 100%;
    max-height: 250px;
    border-radius: 8px;
    background: #000;
}

/* Button accent style for play button */
.btn-accent {
    background: var(--accent);
    color: #000;
    font-weight: 600;
}

.btn-accent:hover {
    background: #00c853;
}

/* Goal actions */
.goal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Inline play button for goals with video */
.goal-text-with-video {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.goal-play-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    animation: pulse-play 2s infinite;
    white-space: nowrap;
}

.goal-play-btn:hover {
    background: linear-gradient(135deg, #ff5252, #d63031);
    transform: scale(1.05);
}

@keyframes pulse-play {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(255, 107, 107, 0); }
}

/* Bench Actions */
.bench-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.bench-actions .btn {
    flex: 1;
}

/* Import Players Modal */
.import-match-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.import-match-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.import-match-item:hover {
    background: var(--bg-card);
    border-color: var(--accent);
}

.import-match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.import-score {
    color: var(--accent);
    font-size: 1.1rem;
}

.import-match-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

/* My Team Label Inline (in forms) */
.my-team-label-inline {
    color: #64b5f6;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 4px;
}

/* Media Gallery Section */
.media-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.media-gallery {
    margin-bottom: 0.75rem;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

.media-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-secondary);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-type-icon {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.7);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.media-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(255,0,0,0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.media-item:hover .media-delete-btn {
    opacity: 1;
}

.media-actions {
    display: flex;
    gap: 0.5rem;
}

/* Media badge on match cards */
.media-badge {
    background: #9c27b0;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Media controls (rotation, etc.) */
.media-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

/* Video admin actions */
.video-admin-actions {
    display: flex;
    justify-content: center;
    padding: 0.75rem;
    border-top: 1px solid var(--border);
}

/* ==================== TOURNAMENT GALLERY ====================*/
/* Gallery Card on Frontpage */
.tournament-gallery-card {
    background: linear-gradient(135deg, #1a2332, #0d1117);
    border-radius: var(--radius-lg);
    padding: 0;
    margin-top: 2rem;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    min-height: 180px;
}

.tournament-gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 230, 118, 0.2);
    border-color: var(--accent-primary);
}

.gallery-card-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(0, 230, 118, 0.15), transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(0, 191, 165, 0.1), transparent 50%);
}

.gallery-card-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
}

.gallery-card-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.gallery-card-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.gallery-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.gallery-card-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.gallery-card-cta {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Full Tournament Gallery Page */
.tournament-gallery-page {
    min-height: 100vh;
    background: var(--bg-primary);
}

.gallery-header {
    position: relative;
    padding: 3rem 1rem 2rem;
    text-align: center;
    overflow: hidden;
}

.gallery-header-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #1a2332, var(--bg-primary)),
                radial-gradient(ellipse at 50% 0%, rgba(0, 230, 118, 0.2), transparent 60%);
}

.gallery-header-content {
    position: relative;
}

.gallery-back-btn {
    position: absolute;
    top: 0;
    left: 0;
}

.gallery-trophy {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.gallery-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    letter-spacing: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.gallery-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.gallery-stats-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.gallery-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-stat .stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--accent-primary);
}

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

.gallery-share-btn {
    margin-top: 0.5rem;
}

.gallery-main {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-section {
    margin-bottom: 2rem;
}

.gallery-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Goal Videos Grid */
.gallery-goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.gallery-goal-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: 1px solid var(--border-color);
    position: relative;
}

.gallery-goal-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.goal-card-preview {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
}

.goal-card-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 3rem;
    transition: background var(--transition-fast);
}

.gallery-goal-card:hover .play-overlay {
    background: rgba(0, 230, 118, 0.3);
}

.goal-card-info {
    padding: 0.75rem;
}

.goal-card-scorer {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.goal-card-match {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.goal-card-time {
    font-size: 0.7rem;
    color: var(--accent-primary);
    margin-top: 0.25rem;
}

/* Media Grid */
.gallery-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.gallery-media-card {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all var(--transition-smooth);
}

.gallery-media-card:hover {
    transform: scale(1.02);
    border-color: var(--accent-primary);
}

.gallery-media-card img,
.gallery-media-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-type-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.25rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.media-source-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1.5rem 0.5rem 0.5rem;
    font-size: 0.65rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-hide-btn {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-fast);
    font-size: 0.75rem;
}

.gallery-goal-card:hover .gallery-hide-btn,
.gallery-media-card:hover .gallery-hide-btn {
    opacity: 1;
}

/* Results Section */
.gallery-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gallery-result-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
}

.gallery-result-card:hover {
    border-color: var(--accent-primary);
}

.result-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.result-team {
    flex: 1;
    font-size: 0.85rem;
}

.result-team:last-child {
    text-align: right;
}

.result-team.winner {
    color: var(--accent-primary);
    font-weight: 600;
}

.result-score {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--text-primary);
    min-width: 60px;
    text-align: center;
}

.result-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.25rem;
}

/* Empty Gallery State */
.gallery-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.gallery-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.gallery-empty-hint {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Hidden Items Modal */
.hidden-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hidden-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .gallery-stats-row {
        gap: 1rem;
    }
    
    .gallery-stat .stat-value {
        font-size: 1.5rem;
    }
    
    .gallery-goals-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-media-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Media view modal with rotation support */
.media-view-modal {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    max-width: 95vw;
}

.media-viewport {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 200px;
    max-height: 60vh;
    background: #000;
    border-radius: var(--radius-md);
}

/* Rotating media wrapper */
.media-rotatable-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    max-width: 100%;
    max-height: 100%;
}

.media-rotatable-wrapper video,
.media-rotatable-wrapper img {
    max-width: 85vw;
    max-height: 55vh;
    object-fit: contain;
}

/* When rotated 90 or 270 degrees, scale down to fit */
.media-rotatable-wrapper.rotated-sideways video,
.media-rotatable-wrapper.rotated-sideways img {
    max-width: 55vh;
    max-height: 80vw;
}

/* Fixed rotate controls at bottom of modal */
.media-controls-fixed {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.media-controls-fixed .btn {
    min-width: 100px;
}

/* Old overlay style - keep for backward compatibility but hide */
.media-controls-overlay {
    display: none;
}

/* Tournament weblink in section title */
.tournament-weblink {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.15), rgba(0, 191, 165, 0.15));
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.tournament-weblink:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* Mobile adjustments for media viewer */
@media (max-width: 768px) {
    .media-view-modal {
        max-height: 95vh;
        max-width: 100vw;
        margin: 0;
        border-radius: 0;
    }
    
    .media-viewport {
        max-height: 50vh;
    }
    
    .media-rotatable-wrapper video,
    .media-rotatable-wrapper img {
        max-width: 95vw;
        max-height: 45vh;
    }
    
    .media-rotatable-wrapper.rotated-sideways video,
    .media-rotatable-wrapper.rotated-sideways img {
        max-width: 45vh;
        max-height: 90vw;
    }
    
    .media-controls-fixed {
        padding: 0.75rem;
    }
    
    .media-controls-fixed .btn {
        min-width: 80px;
        font-size: 0.85rem;
    }
}

/* Tournament link banner */
.tournament-link-banner {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.1), rgba(0, 191, 165, 0.1));
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.tournament-link-banner a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.tournament-link-banner a:hover {
    color: var(--accent-secondary);
}

.tournament-link-banner .external-icon {
    font-size: 0.8em;
    opacity: 0.7;
}

/* Warning text button */
.btn-warning-text {
    color: #ffc107 !important;
    border-color: #ffc107 !important;
}

/* Gallery header actions (share + link buttons) */
.gallery-header-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.gallery-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Form section divider */
.form-section-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.form-section-divider::before,
.form-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.form-section-divider span {
    padding: 0 0.75rem;
}

.form-hint {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Sync results modal */
.sync-section {
    background: var(--bg-pitch);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.sync-section-muted {
    opacity: 0.7;
}

.sync-section-title {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.sync-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.sync-item:hover {
    background: var(--bg-hover);
}

.sync-item input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

.sync-item-content {
    flex: 1;
    font-size: 0.9rem;
}

.sync-item-readonly {
    padding: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.sync-change {
    color: #ffc107;
    font-weight: 600;
}

.sync-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.sync-pitch {
    color: var(--accent-secondary);
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.sync-all-synced {
    text-align: center;
    padding: 2rem;
    color: var(--accent-primary);
}

.sync-all-synced p {
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

/* Loading spinner animation */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Accent button */
.btn-accent {
    background: var(--accent-primary);
    color: #000;
}

.btn-accent:hover {
    background: var(--accent-secondary);
}

/* Tournify sync banner on frontpage */
.tournify-sync-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.1), rgba(0, 191, 165, 0.05));
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tournify-sync-banner.tournify-setup {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.1), rgba(100, 181, 246, 0.05));
    border-color: #64b5f6;
}

.sync-banner-info {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.sync-banner-buttons {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .tournify-sync-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .sync-banner-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .sync-banner-buttons .btn {
        width: 100%;
    }
}

/* Paste import modal */
.import-instructions {
    background: var(--bg-pitch);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.import-instructions p {
    margin-bottom: 0.5rem;
}

.import-instructions ol {
    margin: 0;
    padding-left: 1.25rem;
}

.import-instructions li {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.import-instructions a {
    color: var(--accent-primary);
}

.paste-textarea {
    font-family: monospace;
    font-size: 0.85rem;
    min-height: 200px;
    resize: vertical;
}

.import-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 480px) {
    .import-settings {
        grid-template-columns: 1fr;
    }
}

/* Sync group tag */
.sync-group {
    display: inline-block;
    background: rgba(100, 181, 246, 0.2);
    color: #64b5f6;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    font-weight: 500;
}

/* ==================== KNOCKOUT MATCH STYLES ==================== */

/* Knockout badge in clock section */
.knockout-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Checkbox label for settings */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

/* ==================== PENALTY SHOOTOUT MODAL ==================== */

.penalty-modal {
    max-width: 500px;
    width: 95%;
}

.penalty-header {
    background: linear-gradient(135deg, #1a2332, #243447);
    border-bottom: 2px solid #ffd700;
}

.penalty-header h3 {
    color: #ffd700;
}

/* Main score display */
.penalty-main-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #0d1520, #1a2332);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.penalty-team-score {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.penalty-team-score.shooting {
    background: rgba(255, 215, 0, 0.15);
    border: 2px solid #ffd700;
}

.penalty-team-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.penalty-score-big {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.penalty-subscore {
    font-size: 1rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.penalty-vs {
    padding: 0 0.5rem;
    text-align: center;
}

.penalty-round-indicator {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.penalty-vs-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffd700;
}

/* Penalty tracker (like TV display) */
.penalty-tracker {
    background: linear-gradient(135deg, #1e3a1e, #0d1f0d);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.penalty-tracker-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.penalty-tracker-row:first-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.75rem;
    margin-bottom: 0.25rem;
}

.penalty-tracker-team {
    width: 40px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.penalty-dots {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.penalty-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.penalty-dot.scored {
    background: linear-gradient(135deg, #00e676, #00c853);
    border-color: #00e676;
    color: #000;
}

.penalty-dot.missed {
    background: linear-gradient(135deg, #ff5252, #d32f2f);
    border-color: #ff5252;
    color: #fff;
}

.penalty-dot.current {
    border-color: #ffd700;
    animation: pulse-gold 1.5s infinite;
}

@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(255, 215, 0, 0); }
}

.penalty-tracker-score {
    width: 30px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* Current shooter section */
.penalty-current-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.penalty-current-section h4 {
    margin: 0 0 1rem 0;
    color: #ffd700;
    font-size: 0.95rem;
    text-align: center;
}

.penalty-shooter-select {
    margin-bottom: 1rem;
}

.penalty-shooter-select label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.penalty-shooter-info {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-pitch);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.shooter-name {
    font-weight: 600;
    color: var(--text-primary);
}

/* Action buttons */
.penalty-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.penalty-btn-scored,
.penalty-btn-missed {
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.penalty-btn-scored {
    background: linear-gradient(135deg, #00e676, #00c853);
    color: #000;
    border: none;
}

.penalty-btn-scored:hover {
    background: linear-gradient(135deg, #00c853, #00a040);
    transform: scale(1.02);
}

.penalty-btn-missed {
    background: linear-gradient(135deg, #ff5252, #d32f2f);
    color: #fff;
    border: none;
}

.penalty-btn-missed:hover {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    transform: scale(1.02);
}

/* Shooters order list */
.penalty-shooters-order {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.penalty-shooters-order h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.shooters-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.shooter-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-pitch);
    border-radius: var(--radius-sm);
    cursor: grab;
    transition: all 0.2s ease;
}

.shooter-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.shooter-item.taken {
    opacity: 0.6;
    cursor: default;
}

.shooter-item.dragging {
    opacity: 0.5;
    background: rgba(255, 215, 0, 0.2);
}

.shooter-order {
    width: 24px;
    height: 24px;
    background: var(--accent-primary);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.shooter-info {
    flex: 1;
    font-size: 0.9rem;
}

.shooter-result {
    font-size: 1rem;
    font-weight: 700;
}

.shooter-result.scored {
    color: #00e676;
}

.shooter-result.missed {
    color: #ff5252;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .penalty-modal {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        height: 100%;
        max-height: 100%;
    }
    
    .penalty-main-score {
        padding: 0.75rem 0.5rem;
    }
    
    .penalty-score-big {
        font-size: 1.75rem;
    }
    
    .penalty-dot {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .penalty-tracker {
        padding: 0.75rem;
    }
    
    .penalty-action-buttons {
        grid-template-columns: 1fr;
    }
    
    .penalty-btn-scored,
    .penalty-btn-missed {
        padding: 1.25rem;
    }
}

/* Penalties status badge */
.status-badge.penalties {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    font-weight: 700;
    animation: pulse-gold 1.5s infinite;
}

/* Small knockout badge for match cards */
.knockout-badge-sm {
    font-size: 0.7rem;
}

/* Penalties status in match card */
.match-status.penalties {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
}

/* Penalty team selection modal */
.penalty-team-select-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.penalty-team-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: var(--bg-pitch);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    min-width: 140px;
    transition: all 0.2s ease;
}

.penalty-team-btn:hover {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    transform: scale(1.02);
}

.penalty-team-btn .team-badge-mini {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
}

.penalty-team-btn span:last-child {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 400px) {
    .penalty-team-select-buttons {
        flex-direction: column;
    }
    
    .penalty-team-btn {
        flex-direction: row;
        justify-content: center;
        padding: 1rem;
    }
}

/* Penalty Video Prompt Modal */
.penalty-video-modal {
    max-width: 350px;
}

.penalty-video-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.video-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-pitch);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.video-upload-btn:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 230, 118, 0.1);
}

/* Opponent goal options */
.opponent-goal-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Penalty log entries */
.log-entry.penalty-scored-entry {
    background: rgba(0, 230, 118, 0.1);
    border-left: 3px solid var(--accent-primary);
}

.log-entry.penalty-missed-entry {
    background: rgba(255, 82, 82, 0.1);
    border-left: 3px solid #ff5252;
}

.penalty-text-with-video {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Recycle Bin Modal */
.deleted-matches-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.deleted-match-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-pitch);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    gap: 1rem;
}

.deleted-match-info {
    flex: 1;
    min-width: 0;
}

.deleted-match-title {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.deleted-match-title .media-badge {
    font-size: 0.8rem;
    color: var(--accent-primary);
}

.deleted-match-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.deleted-match-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.empty-state p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.empty-state small {
    font-size: 0.85rem;
    opacity: 0.7;
}

@media (max-width: 600px) {
    .deleted-match-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .deleted-match-actions {
        width: 100%;
        margin-top: 0.75rem;
    }
    
    .deleted-match-actions .btn {
        flex: 1;
    }
}

/* Battery saving modes */
.power-saving *, .low-power * {
    animation-play-state: paused !important;
    transition: none !important;
}
.power-saving .pitch-player::after,
.low-power .pitch-player::after {
    animation: none !important;
}


/* Battery saver button */
.btn-icon { padding: 0.4rem 0.6rem; min-width: auto; background: transparent; border: 1px solid var(--border-light); }
.btn-icon.active { background: var(--accent-primary); border-color: var(--accent-primary); }
.btn-icon:hover { background: rgba(255,255,255,0.1); }


/* Power saving button */
.btn-power-saving { background: var(--accent-primary); border-color: var(--accent-primary); color: #000; font-weight: 600; }
.btn-power-saving:hover { background: var(--accent-hover); }


/* Toast notification */
.toast-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.toast-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
