/* Hockey Tournament Hub - 3D Components & Vibrant Sports UI */

/* -------------------------------------------------------------
   Segmented Control Pill Tabs & Filters
------------------------------------------------------------- */
.nav-tabs, .tabs-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ffffff;
    padding: 0.35rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    margin-bottom: 2.25rem;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.nav-tabs::-webkit-scrollbar, .tabs-nav::-webkit-scrollbar {
    display: none;
}

.nav-tab-item, .tab-btn {
    padding: 0.65rem 1.25rem;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
}

.nav-tab-item:hover, .tab-btn:hover {
    color: var(--secondary);
    background: var(--surface-alt);
}

.nav-tab-item.active, .tab-btn.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(5, 150, 105, 0.5);
}

.nav-tab-item.active .svg-icon, .tab-btn.active .svg-icon {
    stroke: #ffffff !important;
    fill: none !important;
}

/* -------------------------------------------------------------
   3D Tournament Cards
------------------------------------------------------------- */
.tournament-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-3d);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    transform: perspective(1000px) translateZ(0);
}

.tournament-card:hover {
    transform: perspective(1000px) translateY(-6px) rotateX(1.5deg);
    box-shadow: var(--shadow-3d-hover);
    border-color: rgba(16, 185, 129, 0.4);
}

.tournament-card-header {
    height: 130px;
    background: linear-gradient(135deg, #064e3b 0%, #0f172a 60%, #0284c7 100%);
    position: relative;
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    overflow: hidden;
}

.tournament-card-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 85% 15%, rgba(0, 245, 155, 0.28) 0%, transparent 50%),
        radial-gradient(circle at 15% 85%, rgba(6, 182, 212, 0.22) 0%, transparent 50%),
        radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 16px 16px;
    pointer-events: none;
}

.tournament-card-header .icon-box {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    border-radius: 12px;
}

.tournament-card-header .badge {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.tournament-banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 0.72;
    z-index: 1;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.tournament-banner-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 13, 22, 0.35) 0%, rgba(9, 13, 22, 0.82) 100%);
    z-index: 1;
    pointer-events: none;
}

.tournament-card:hover .tournament-banner-img {
    transform: scale(1.08);
    opacity: 0.88;
}

.tournament-card-body {
    padding: 1.35rem 1.25rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.tournament-card-title {
    font-size: 1.18rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
    line-height: 1.35;
}

.tournament-card-title a {
    color: #0f172a !important;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tournament-card-title a:hover {
    color: #059669 !important;
}

.tournament-spec-box {
    background: #f8fafc;
    padding: 0.85rem 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tournament-spec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.84rem;
}

.tournament-spec-label {
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    font-weight: 500;
}

.tournament-spec-label svg {
    flex-shrink: 0;
}

.tournament-spec-value {
    white-space: nowrap;
    text-align: right;
    font-weight: 700;
    color: #0f172a;
}

.tournament-card-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.15rem;
}

.tournament-btn-details {
    flex: 1;
    color: #0f172a !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0.55rem 0.65rem !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    justify-content: center;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tournament-btn-details:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #059669 !important;
}

.tournament-btn-register {
    flex: 1.35;
    padding: 0.55rem 0.75rem !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    justify-content: center;
    border-radius: var(--radius-md);
}

.tournament-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1.25rem 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.tournament-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tournament-meta-item .svg-icon {
    color: var(--primary);
}

/* -------------------------------------------------------------
   3D Match Fixture Tile & Scoreboards
------------------------------------------------------------- */
.match-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow-3d);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.match-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-3d-hover);
    border-color: rgba(6, 182, 212, 0.4);
}

.match-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    margin-bottom: 1.1rem;
}

.match-header-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.match-header-tournament {
    font-weight: 700;
    font-size: 0.88rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-header-tournament svg {
    flex-shrink: 0;
}

.match-header-round {
    font-size: 0.76rem;
    color: #64748b;
    font-weight: 600;
}

.match-teams-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    text-align: center;
    margin: 0.75rem 0 1rem;
}

.match-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.match-team-logo {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--secondary);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08), inset 0 1px 1px rgba(255,255,255,0.8);
}

.match-team-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--secondary);
}

.match-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #0f172a;
    color: #ffffff;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35), 0 0 15px rgba(0, 245, 155, 0.2);
}

.match-vs {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-light);
    text-transform: uppercase;
}

.match-venue-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-alt);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* -------------------------------------------------------------
   3D Points Table & Standings
------------------------------------------------------------- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    padding: 4px 2px;
    -webkit-overflow-scrolling: touch;
}

.table-3d {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.table-3d th {
    background: #0f172a;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.85rem 1rem;
    text-align: center;
    white-space: nowrap;
}

.table-3d td {
    white-space: nowrap;
}

/* -------------------------------------------------------------
   Responsive Desktop Table vs Mobile 3D Card Toggle
------------------------------------------------------------- */
.desktop-only-table {
    display: block;
}
.mobile-only-cards {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only-table {
        display: none !important;
    }
    .mobile-only-cards {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
        padding: 1rem;
    }
}

/* 3D Mobile Fixture Card Styling */
.admin-fixture-card-3d {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 1.25rem;
    box-shadow: var(--shadow-3d);
    position: relative;
    overflow: hidden;
}

.admin-fixture-card-3d .card-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.admin-fixture-card-3d .card-vs-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
}

.admin-fixture-card-3d .team-box {
    flex: 1;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--secondary);
    line-height: 1.3;
}

.admin-fixture-card-3d .score-box {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 900;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
    white-space: nowrap;
}

.admin-fixture-card-3d .card-footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: var(--surface-alt);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.table-3d th:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    text-align: left;
}

.table-3d th:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.table-3d tbody tr {
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    border-radius: var(--radius-md);
}

.table-3d tbody tr:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(2, 132, 199, 0.04) 100%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

.table-3d td {
    padding: 1rem;
    text-align: center;
    font-size: 0.92rem;
    color: var(--text);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.table-3d td:first-child {
    border-left: 1px solid var(--border);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    text-align: left;
}

.table-3d td:last-child {
    border-right: 1px solid var(--border);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.table-3d .rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.82rem;
}

.rank-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #fde047 100%);
    color: #78350f;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.rank-silver {
    background: linear-gradient(135deg, #94a3b8 0%, #cbd5e1 100%);
    color: #1e293b;
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.4);
}

.rank-bronze {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.4);
}

.table-3d .points-cell {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--primary);
}

/* -------------------------------------------------------------
   3D Modals
------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
}

.modal-overlay.active, .modal-overlay.show {
    display: flex;
}

.modal-3d, .modal-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 30px rgba(16, 185, 129, 0.15);
    animation: modalPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

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

.modal-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-alt);
}

.modal-header h3 {
    margin-bottom: 0;
    font-size: 1.2rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 1.75rem;
    flex: 1;
}

.modal-footer {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border);
    background: var(--surface-alt);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* -------------------------------------------------------------
   3D Player Cards
------------------------------------------------------------- */
.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.player-card-3d, .player-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.player-card-3d:hover, .player-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(16, 185, 129, 0.35);
}

.player-jersey-badge {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.3);
    flex-shrink: 0;
}

.player-name-title {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.98rem;
    margin-bottom: 0.2rem;
}

.player-position-chip {
    background: #ecfeff;
    color: #0284c7;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* -------------------------------------------------------------
   Progress Bars
------------------------------------------------------------- */
.progress-bar-container {
    width: 100%;
    height: 10px;
    background: var(--surface-alt);
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid var(--border);
}

.progress-bar-fill, .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #059669 0%, #10b981 50%, #00f59b 100%);
    border-radius: var(--radius-full);
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 10px rgba(0, 245, 155, 0.5);
}

/* -------------------------------------------------------------
   Notification Dropdown Component
------------------------------------------------------------- */
.notif-bell-container {
    position: relative;
    display: inline-block;
}

.notif-badge-pill {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9999px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    border: 2px solid #ffffff;
}

.notif-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 340px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
    display: none;
    z-index: 1000;
    overflow: hidden;
    margin-top: 0.75rem;
    animation: notifPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes notifPop {
    from { opacity: 0; transform: translateY(-8px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-dropdown-menu.show {
    display: block;
}

