        :root {
            --primary-color: #3498db;
            --accent-color: #e74c3c;
            --white: #fff;
            --text-color: #333;
            --shadow-color: rgba(0,0,0,0.1);
            --primary: #4f46e5;
            --secondary: #7c3aed;
            --accent: #10b981;
            --dark: #1e293b;
            --light: #f8fafc;
            --border: #e2e8f0;
            --text-muted: #64748b;
        }
        
        body {
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
            color: var(--text-color);
            min-height: 100vh;
            overflow-x: hidden;
            background: linear-gradient(-45deg, #e0f2ff, #ffebf3, #e0f7fa, #fff8e1);
            background-size: 400% 400%;
            animation: gradientBG 15s ease infinite;
        }
        
        @keyframes gradientBG {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        
          * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        body {
            font-family: Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            background-color: #f5f5f5;
            padding: 20px;
        }
        
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.status-pending {
    background-color: #6c757d; /* Сив за чакащи */
}

.status-in-progress {
    background-color: #ffc107; /* Жълт за в процес */
    color: #000;
}

.status-completed {
    background-color: #28a745; /* Зелен за завършени */
}

        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        h1, h2, h3 {
            color: #2c3e50;
            margin-bottom: 15px;
        }
        
        .breadcrumb {
            margin-bottom: 20px;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 4px;
        }
        
        .breadcrumb a {
            color: #007bff;
            text-decoration: none;
        }
        
        .breadcrumb a:hover {
            text-decoration: underline;
        }
        
        .selection-panel {
            margin-bottom: 30px;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 4px;
        }
        
        .form-group {
            margin-bottom: 15px;
        }
        
        label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }
        
        select, button {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 16px;
        }
        
        select {
            width: 100%;
        }
        
        button {
            background: #007bff;
            color: white;
            cursor: pointer;
            border: none;
        }
        
        button:hover {
            background: #0056b3;
        }
        
        .start-list-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }
        
        .start-list-table th, 
        .start-list-table td {
            padding: 10px;
            text-align: left;
            border: 1px solid #ddd;
        }
        
        .start-list-table th {
            background: #f8f9fa;
            font-weight: bold;
        }
        
        .start-list-table tr:hover {
            background: #f8f9fa;
        }
        
        .start-list-table .inactive-row {
            opacity: 0.55;
            text-decoration: line-through;
        }
        
        .photo-thumbnail {
            width: 40px;
            height: 40px;
            object-fit: cover;
            border-radius: 4px;
        }
        
        .apparatus-thumbnail {
            width: 30px;
            height: 30px;
            object-fit: contain;
        }
        
        .flag-icon {
            width: 20px;
            height: 15px;
            object-fit: contain;
            margin-right: 5px;
            vertical-align: middle;
        }
        
        .score-display {
            font-weight: bold;
            cursor: pointer;
            color: #007bff;
        }
        
        .score-display:hover {
            text-decoration: underline;
        }
        
        /* Модален прозорец */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
        }
        
        .modal-content {
            background-color: white;
            margin: 5% auto;
            padding: 20px;
            border-radius: 8px;
            width: 80%;
            max-width: 800px;
            max-height: 80vh;
            overflow-y: auto;
        }
        
        .close {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }
        
        .close:hover {
            color: black;
        }
        
        .score-details {
            margin-top: 20px;
        }
        
        .score-section {
            margin-bottom: 20px;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 4px;
        }
        
        .score-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 10px;
        }
        
        .score-item {
            padding: 10px;
            background: white;
            border-radius: 4px;
            border: 1px solid #ddd;
        }
        
        .score-label {
            font-weight: bold;
            margin-bottom: 5px;
        }
        
        .score-value {
            font-size: 18px;
            color: #2c3e50;
        }
        
        .loading {
            text-align: center;
            padding: 20px;
            font-style: italic;
            color: #6c757d;
        }
        
        .action-buttons {
            display: flex;
            gap: 5px;
        }
        
        .action-buttons button {
            padding: 5px 10px;
            font-size: 14px;
        }
        
        @media (max-width: 768px) {
            .container {
                padding: 10px;
            }
            
            .modal-content {
                width: 95%;
                margin: 10% auto;
            }
            
            .score-grid {
                grid-template-columns: 1fr;
            }
        }                                     
                                        
        .main-container {
            background-color: rgba(255, 255, 255, 0.85);
            border-radius: 8px;
            box-shadow: 0 2px 15px var(--shadow-color);
            margin: 20px auto;
            max-width: 1400px;
            padding: 20px;
            position: relative;
            backdrop-filter: blur(2px);
        }
        
        .event-header {
            display: grid;
            grid-template-columns: auto 1fr auto;
            align-items: center;
            background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
            color: var(--white);
            padding: 14px 24px;
            height: auto;
            min-height: 200px;
            position: relative;
            z-index: 10;
            box-shadow: 0 4px 20px rgba(0,0,0,0.15);
            border-radius: 8px;
            margin: 10px auto;
            max-width: 1400px;
            gap: 15px;
        }
        
        .logo-container {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            position: relative;
            z-index: 2;
        }
        
        .event-logo {
            height: 100px;
            width: auto;
            max-width: 100%;
            object-fit: contain;
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
            transition: all 0.5s ease;
            z-index: 2;
            animation: logoFloat 4s ease-in-out infinite;
            background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.5) 45%, rgba(255,255,255,0) 70%);
            border-radius: 16px;
            padding: 6px 10px;
        }
        
        @keyframes logoFloat {
            0%, 100% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-5px) rotate(2deg); }
        }
        
        .event-info {
            text-align: center;
            min-width: 0;
            padding: 5px;
            z-index: 2;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        
        .event-club {
            font-size: clamp(1.2rem, 2.5vw, 1.8rem);
            font-weight: 700;
            margin: 0;
            color: var(--white);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }
        
        .event-title {
            font-size: clamp(0.7rem, 1.5vw, 1.1rem);
            font-weight: 500;
            color: rgba(255,255,255,0.9);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }
        
        .video-container {
            width: 100%;
            max-width: 1400px;
            margin: 20px auto;
            position: relative;
            background: #000;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 10px 30px var(--shadow-color);
            transition: all 0.3s ease;
            border: 2px solid rgba(255,255,255,0.2);
            aspect-ratio: 16/9;
        }
        
        #owncastEmbed {
            width: 100%;
            height: 100%;
            border-radius: 8px;
            border: none;
            position: absolute;
            top: 0;
            left: 0;
        }
        
        .pause-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: rgba(0, 0, 0, 0.7);
            z-index: 5;
            transition: opacity 0.8s ease, transform 0.8s ease;
        }
        
        .pause-overlay img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .event-countdown {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 6;
            background: rgba(0, 0, 0, 0.6);
            padding: 16px 24px;
            border-radius: 12px;
            text-align: center;
            color: #fff;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        }

        .event-countdown-date {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 6px;
        }

        .event-countdown-time {
            font-size: 26px;
            font-weight: 700;
            letter-spacing: 2px;
        }
        
        .video-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: rgba(0,0,0,0.5);
            z-index: 10;
        }
        
        #playButton {
            padding: 10px 20px;
            font-size: 1.2rem;
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        
        .simple-gallery {
            margin: 20px 0;
            text-align: center;
        }
        
        .image-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 20px;
            margin-top: 15px;
        }
        
        .image-item img {
            width: 100%;
            height: auto;
            border: 1px solid #e0e0e0;
            border-radius: 4px;
            margin-bottom: 8px;
        }
        
        .slider-container {
            width: 100%;
            overflow: hidden;
            position: relative;
            border-radius: 20px;
            box-shadow: 0 8px 15px var(--shadow-color);
            margin-top: 40px;
        }
        
        .slider-track {
            display: flex;
            width: max-content;
            animation: scroll 40s linear infinite;
        }
        
        .slider-track img {
            width: 250px;
            height: 360px;
            margin: 0 10px;
            object-fit: contain;
            opacity: 0.9;
            transition: opacity 0.3s;
        }
        
        @keyframes scroll {
            0% { transform: translateX(0); }
            100% { transform: translateX(-50%); }
        }
        
        .tab-container {
            display: flex;
            justify-content: center;
            margin: 20px 0;
            gap: 10px;
        }
        
        .tab-button {
            padding: 12px 24px;
            font-size: 1rem;
            font-weight: 600;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        
        .tab-button:hover {
            background-color: var(--secondary);
            transform: translateY(-2px);
        }
        
        .tab-button.active {
            background-color: var(--accent);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }
        
        .archive-container {
            display: none;
            background-color: white;
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
            margin: 20px auto;
            max-width: 1400px;
            overflow: hidden;
        }
        
        .archive-header {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            padding: 1.5rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .archive-logo {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: 1.5rem;
            font-weight: 600;
        }
        
        .archive-controls {
            display: flex;
            gap: 1rem;
        }
        
        .search-box {
            position: relative;
            width: 200px;
            margin-right: auto;
        }
        
        .search-box input {
            width: 100%;
            padding: 0.75rem 1rem 0.75rem 2.5rem;
            border: none;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            font-size: 0.95rem;
            transition: all 0.3s;
        }
        
        .search-box input::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }
        
        .search-box i {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
        }
        
        .table-container {
            padding: 1.5rem;
            overflow-x: auto;
        }
        
        table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
        }
        
        th {
            background: #f1f5f9;
            color: var(--text-muted);
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.75rem;
            letter-spacing: 0.5px;
            padding: 1rem;
            text-align: left;
            position: sticky;
            top: 0;
        }
        
        tr {
            transition: all 0.2s;
        }
        
        tr:hover {
            background: #f5f7fa !important;
            transform: translateY(-1px);
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        }
        
        td {
            padding: 1rem;
            border-bottom: 1px solid var(--border);
            vertical-align: middle;
        }
        
        tr:last-child td {
            border-bottom: none;
        }
        
        .competitions-landing {
            max-width: 900px;
            margin: 0 auto 24px;
            padding: 16px;
        }

        .competitions-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 16px;
        }

        .competitions-logo {
            height: 52px;
            width: 52px;
            border-radius: 12px;
            padding: 6px;
            background: white;
            box-shadow: 0 2px 8px rgba(15,23,42,0.18);
            object-fit: contain;
        }

        .competitions-text-block {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .competitions-title {
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--dark);
            margin: 0;
        }

        .competitions-info-text {
            font-size: 0.85rem;
            color: var(--text-muted);
            line-height: 1.4;
        }

        .competitions-info-text span {
            font-weight: 600;
            color: var(--primary);
        }

        .competitions-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 8px;
        }

        .competition-card {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 14px;
            background: rgba(255,255,255,0.96);
            box-shadow: 0 4px 10px rgba(15,23,42,0.08);
            text-decoration: none;
            color: inherit;
            border: 1px solid rgba(148,163,184,0.35);
        }

        .competition-card:hover {
            box-shadow: 0 6px 14px rgba(15,23,42,0.16);
            transform: translateY(-1px);
        }

        .competition-icon {
            flex-shrink: 0;
            width: 40px;
            height: 40px;
            border-radius: 12px;
            background: #eff6ff;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary);
            overflow: hidden;
        }

        .competition-icon img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .competition-main {
            flex: 1;
            min-width: 0;
        }

        .competition-name {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--dark);
            margin: 0 0 4px;
        }

        .competition-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 6px 12px;
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .competition-meta-item {
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .competition-meta-item i {
            font-size: 0.8rem;
        }

        .competition-organizer {
            margin-top: 4px;
            font-size: 0.8rem;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .competition-cta {
            display: inline-flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: 2px;
            font-size: 0.6rem;
            color: #ffffff;
            font-weight: 600;
            flex-shrink: 0;
            padding: 4px 8px;
            border-radius: 999px;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            box-shadow: 0 2px 5px rgba(15,23,42,0.25);
        }

        .competition-card:hover .competition-cta {
            box-shadow: 0 3px 6px rgba(15,23,42,0.35);
            transform: translateY(-0.5px);
        }

        .competition-cta i {
            font-size: 0.8rem;
        }

        .competitions-empty {
            margin-top: 12px;
            text-align: center;
            font-size: 0.9rem;
            color: var(--text-muted);
        }

        .competitions-footer {
            margin-top: 16px;
            text-align: center;
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        @media (max-width: 600px) {
            .competitions-landing {
                padding: 12px;
            }

            .competitions-header {
                align-items: flex-start;
            }

            .competition-card {
                padding: 10px;
            }

            .competition-name {
                font-size: 0.9rem;
            }

            .competition-meta,
            .competition-organizer {
                font-size: 0.78rem;
            }
        }
        
        .player-name {
            font-weight: 500;
            color: var(--dark);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .player-name i {
            color: var(--primary);
            font-size: 1.1rem;
        }
        
        .file-meta {
            display: flex;
            gap: 1.5rem;
            color: var(--text-muted);
            font-size: 0.875rem;
        }
        
        .file-meta span {
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }
        
        .action-btns {
            display: flex;
            gap: 0.5rem;
        }
        
        .btn {
            padding: 0.5rem 0.75rem;
            border-radius: 6px;
            font-size: 0.875rem;
            font-weight: 500;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
        }
        
        .btn-primary {
            background: var(--primary);
            color: white;
        }
        
        .btn-outline {
            background: transparent;
            border: 1px solid var(--border);
            color: var(--dark);
        }
        
        .btn-success {
            background: var(--accent);
            color: white;
        }
        
        .btn-copy {
            background: #f1f5f9;
            color: var(--text-muted);
        }
        
        .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }
        
        .status-msg {
            text-align: center;
            padding: 3rem;
            color: var(--text-muted);
        }
        
        .popup-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.9);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            animation: fadeIn 0.3s;
        }
        
        .popup-content {
            width: 90%;
            max-width: 900px;
            position: relative;
        }
        
        .video-player {
            width: 100%;
            border-radius: 8px;
            box-shadow: 0 0 20px rgba(0,0,0,0.5);
        }
        
        .close-btn {
            position: absolute;
            top: -40px;
            right: 0;
            background: #fff;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            font-size: 1.2rem;
            cursor: pointer;
            transition: transform 0.2s;
        }
        
        .close-btn:hover {
            transform: rotate(90deg);
        }
        
        .video-meta-popup {
            color: white;
            margin-top: 15px;
            display: flex;
            justify-content: space-between;
            font-size: 0.9rem;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        @keyframes fadeInRow {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .fade-in {
            animation: fadeInRow 0.4s ease-out forwards;
        }
        
        /* Gallery Styles */
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 1rem;
            padding: 1rem;
        }
        
        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 8px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
            aspect-ratio: 1/1;
        }
        
        .gallery-item:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }
        
        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            cursor: pointer;
            transition: transform 0.3s ease;
        }
        
        .gallery-item:hover img {
            transform: scale(1.05);
        }
        
        /* Photo Modal */
        .photo-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.9);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }
        
        .photo-modal.active {
            display: flex;
        }
        
        .photo-modal-content {
            position: relative;
            max-width: 90%;
            max-height: 90%;
            cursor: pointer;
        }
        
        .photo-modal img {
            max-width: 100%;
            max-height: 90vh;
            object-fit: contain;
        }
        
        .photo-modal-close {
            position: absolute;
            top: -40px;
            right: 0;
            background: #fff;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            font-size: 1.2rem;
            cursor: pointer;
            z-index: 1001;
        }
        
        .photo-modal-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0,0,0,0.5);
            color: white;
            border: none;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            font-size: 1.5rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1001;
        }
        
        .photo-modal-prev {
            left: 20px;
        }
        
        .photo-modal-next {
            right: 20px;
        }
        
        .photo-modal-actions {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1001;
        }
        
        .photo-action-btn {
            background: rgba(255,255,255,0.9);
            border: none;
            border-radius: 4px;
            padding: 8px 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 14px;
            transition: all 0.2s;
            color: #333;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }
        
        .photo-action-btn:hover {
            background: white;
            transform: translateY(-2px);
        }
        
        #shareSuccessMessage {
            display: none;
            margin-top: 8px;
            color: #4CAF50;
            font-size: 14px;
            animation: fadeInOut 3s ease-in-out;
            opacity: 0;
        }
        
        @keyframes fadeInOut {
            0% { opacity: 0; }
            20% { opacity: 1; }
            80% { opacity: 1; }
            100% { opacity: 0; }
        }
        
        /* QR Code Modal */
        .qr-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.9);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }
        
        .qr-modal.active {
            display: flex;
        }
        
        .qr-modal-content {
            background: white;
            padding: 20px;
            border-radius: 10px;
            text-align: center;
            max-width: 300px;
            width: 90%;
        }
        
        .qr-modal-close {
            position: absolute;
            top: 20px;
            right: 20px;
            background: #fff;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            font-size: 1.2rem;
            cursor: pointer;
        }
        
        #qrCodeCanvas {
            margin: 15px auto;
            max-width: 100%;
        }
        
        .qr-modal-text {
            margin-top: 15px;
            font-size: 0.9rem;
            color: #333;
        }
        
        /* Pagination */
        .pagination {
            display: flex;
            justify-content: center;
            margin: 20px 0;
            gap: 5px;
        }
        
        .page-btn {
            padding: 8px 12px;
            border: 1px solid var(--border);
            background: white;
            color: var(--dark);
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .page-btn:hover {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .page-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .page-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        /* QR Button */
        .qr-btn {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 60px;
            height: 60px;
            background: var(--primary);
            color: white;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
            z-index: 100;
            transition: all 0.3s;
        }
        
        .qr-btn:hover {
            background: var(--secondary);
            transform: scale(1.1);
        }
        
        .qr-btn i {
            font-size: 24px;
        }
        
        @media (max-width: 768px) {
            .gallery-grid {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            }
            
            .photo-modal-nav, .qr-modal-close {
                width: 40px;
                height: 40px;
                font-size: 1.2rem;
            }
            
            .photo-action-btn {
                padding: 6px 12px;
                font-size: 12px;
            }
            
            .qr-btn {
                bottom: 20px;
                right: 20px;
                width: 50px;
                height: 50px;
            }
        }
        
        @media (max-width: 992px) {
            .event-header {
                grid-template-columns: auto 1fr auto;
                padding: 10px;
                gap: 10px;
            }
            
            .event-logo {
                height: 80px;
            }
            
            .event-club {
                font-size: clamp(1rem, 4vw, 1.5rem);
            }
            
            .event-title {
                font-size: clamp(0.6rem, 2.5vw, 0.9rem);
            }
        }
        
        @media (max-width: 768px) {
            .event-header {
                grid-template-columns: 1fr;
                text-align: center;
                height: auto;
                padding: 10px;
            }
            
            .logo-container {
                display: none;
            }
            
            .event-info {
                order: -1;
                margin-bottom: 10px;
            }
            
            #owncastEmbed {
                min-height: 300px;
            }
        }
        
        @media (max-width: 480px) {
            .event-header {
                padding: 8px;
            }
            
            .event-club {
                font-size: 1.1rem;
            }
            
            .event-title {
                font-size: 0.7rem;
            }
            
            .event-logo {
                height: 60px;
            }
            
            .slider-track img {
                width: 180px;
                height: 260px;
            }
            
            #owncastEmbed {
                min-height: 250px;
            }
            
            .tab-button {
                padding: 10px 15px;
                font-size: 0.9rem;
            }
            
            .search-box {
                width: 150px;
            }
        }

/* Скалиране на player.php за по-малки екрани – прави изгледа като десктоп, но умален */
@media (max-width: 1024px) {
    body.player-desktop-scaled {
        transform: scale(0.8);
        transform-origin: top left;
    }
}

@media (max-width: 768px) {
    body.player-desktop-scaled {
        transform: scale(0.7);
        transform-origin: top left;
    }
}

@media (max-width: 480px) {
    body.player-desktop-scaled {
        transform: scale(0.6);
        transform-origin: top left;
    }
}

/* Модален прозорец за уреди на отбор (ансамбъл) */
.team-apparatus-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.team-apparatus-modal-content {
    background-color: #fefefe;
    margin: 4% auto;
    padding: 24px;
    border-radius: 10px;
    width: 90%;
    max-width: 960px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.team-apparatus-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.team-apparatus-modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.team-apparatus-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.team-apparatus-close:hover {
    color: #000;
}

.team-apparatus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.team-apparatus-item {
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    transition: transform 0.2s, box-shadow 0.2s;
}

.team-apparatus-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.team-apparatus-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 8px;
}

.team-apparatus-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    word-break: break-word;
}

.team-apparatus-empty {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.gymnasts-columns {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.gymnasts-columns .col {
    flex: 1;
    text-align: left;
}

.gymnasts-columns .col-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.countdown-timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 160px;
    line-height: 1;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 25px rgba(0, 0, 0, 0.9);
    letter-spacing: 4px;
    z-index: 5;
    animation: countdown-pulse 1s ease-in-out infinite;
}

@keyframes countdown-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.team-apparatus-item ol {
    margin: 0 0 0 18px;
    padding: 0;
    text-align: left;
}