/* css/page-common.css */
/* Общие стили для всех страниц - вынесены из inline для кэширования */

/* Sticky Footer */
:root {
    --app-shell-bg: #f3f5f8;
    --app-shell-bg-standalone: #eef2f6;
    --app-shell-top: #000000;
    --app-header-height: 69px;
    --app-header-safe-top: 0px;
    --app-header-offset: calc(var(--app-header-height) + var(--app-header-safe-top));
    --app-bottom-nav-base-height: 68px;
    --app-bottom-nav-edge-gap: 0px;
}

html {
    height: 100%;
}

html {
    background: var(--app-shell-top);
}

html, body {
    height: auto !important;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--app-shell-bg) !important;
}

body.has-app-bottom-nav {
    padding-bottom: 0 !important;
}

@media (max-width: 767px) {
    html,
    body {
        overscroll-behavior-y: none;
    }

    body.has-app-bottom-nav {
        --app-header-safe-top: env(safe-area-inset-top);
        padding-bottom: calc(var(--app-bottom-nav-base-height) + env(safe-area-inset-bottom, 0px) + 0.35rem) !important;
    }

    .app-refresh-indicator {
        position: fixed;
        top: calc(var(--app-header-safe-top) + 8px);
        left: 50%;
        z-index: 10040;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        background:
            linear-gradient(145deg, rgba(6, 12, 24, 0.96), rgba(15, 23, 42, 0.94));
        border: 1px solid rgba(96, 165, 250, 0.22);
        box-shadow:
            0 12px 28px rgba(2, 6, 23, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.06);
        opacity: 0;
        pointer-events: none;
        transform: translate(-50%, -18px) scale(0.8);
        transition: opacity 0.14s ease, transform 0.16s ease;
    }

    .app-refresh-indicator__spinner {
        width: 25px;
        height: 25px;
        border-radius: 999px;
        background:
            conic-gradient(from var(--app-refresh-rotation, -90deg), #3b82f6 0deg, #38bdf8 var(--app-refresh-arc, 54deg), rgba(148, 163, 184, 0.22) var(--app-refresh-arc, 54deg), rgba(148, 163, 184, 0.22) 360deg);
        -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
        mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
        transform: rotate(0deg);
    }

    .app-refresh-indicator::after {
        content: '';
        position: absolute;
        width: 10px;
        height: 10px;
        border-radius: 999px;
        background: #0f172a;
        border: 1px solid rgba(96, 165, 250, 0.46);
        opacity: 0.96;
    }

    body.app-refresh-pulling .app-refresh-indicator,
    body.app-refresh-armed .app-refresh-indicator,
    body.app-refresh-refreshing .app-refresh-indicator {
        opacity: 1;
        transform: translate(-50%, var(--app-refresh-offset, 0px)) scale(var(--app-refresh-scale, 1));
    }

    body.app-refresh-armed .app-refresh-indicator {
        border-color: rgba(239, 68, 68, 0.38);
        box-shadow:
            0 12px 28px rgba(2, 6, 23, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.07);
    }

    body.app-refresh-armed .app-refresh-indicator::after {
        background: #ef4444;
        border-color: rgba(255, 255, 255, 0.62);
    }

    body.app-refresh-refreshing .app-refresh-indicator__spinner {
        animation: app-refresh-spin 0.7s linear infinite;
    }

    body.has-app-bottom-nav::before {
        height: var(--app-header-safe-top);
        background: #000000;
        z-index: 80;
    }

    body.has-app-bottom-nav > header {
        position: fixed !important;
        top: var(--app-header-safe-top) !important;
        left: 0;
        right: 0;
        width: 100%;
        height: var(--app-header-height);
        box-sizing: border-box;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        background: #000000 !important;
        border-bottom-color: #1f2937 !important;
        z-index: 65;
        overflow: hidden;
        box-shadow: 0 1px 0 #000000;
        transform: translateZ(0);
        backface-visibility: hidden;
        will-change: transform;
    }

    body.has-app-bottom-nav > header > .container {
        height: 100%;
        min-height: 0 !important;
        box-sizing: border-box;
    }

    body.has-app-bottom-nav > header::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -1px;
        height: 1px;
        background: #000000;
        pointer-events: none;
    }

    body.has-app-bottom-nav > header .christmas-garland,
    body.has-app-bottom-nav > header .christmas-garland-wire,
    body.has-app-bottom-nav > header .christmas-garland-lights,
    body.has-app-bottom-nav > header .christmas-bulb,
    body.has-app-bottom-nav > header .christmas-garland-reflection {
        visibility: hidden !important;
        height: 0 !important;
        opacity: 0 !important;
        overflow: hidden !important;
    }

    body.has-app-bottom-nav > header .christmas-garland {
        display: none !important;
    }

    body.has-app-bottom-nav > header ~ main {
        padding-top: var(--app-header-offset) !important;
    }
}

@keyframes app-refresh-spin {
    to {
        transform: rotate(360deg);
    }
}

body > header {
    contain: layout paint style;
    z-index: 10020 !important;
}

html.app-shell-booting,
html.app-shell-booting body {
    background: var(--app-shell-top) !important;
}

html.app-shell-booting body > :not(header):not(.app-bottom-nav):not(.club-feed-bottom-nav):not(#appTransitionShell):not(script):not(style) {
    visibility: hidden !important;
}

.app-bottom-nav,
.club-feed-bottom-nav {
    z-index: 10030 !important;
}

html.app-shell-booting .app-bottom-nav-item,
html.app-shell-booting .club-feed-bottom-nav-item,
html.app-shell-settling .app-bottom-nav-item,
html.app-shell-settling .club-feed-bottom-nav-item,
body.app-bottom-nav-navigating .app-bottom-nav-item,
body.app-bottom-nav-navigating .club-feed-bottom-nav-item {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

html.app-shell-booting .app-bottom-nav,
html.app-shell-booting .club-feed-bottom-nav,
html.app-shell-settling .app-bottom-nav,
html.app-shell-settling .club-feed-bottom-nav,
body.app-bottom-nav-navigating .app-bottom-nav,
body.app-bottom-nav-navigating .club-feed-bottom-nav {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-top);
    background: var(--app-shell-top);
    z-index: 60;
    pointer-events: none;
}

@supports (padding-top: env(safe-area-inset-top)) {
    body.ios-standalone {
        padding-top: 0;
    }

    body.ios-standalone {
        --ios-safe-top: env(safe-area-inset-top);
        --app-header-safe-top: var(--ios-safe-top);
    }

    body.ios-standalone::before {
        height: env(safe-area-inset-top);
    }

    body.ios-standalone > header {
        top: var(--app-header-safe-top) !important;
        padding-top: 0 !important;
    }

    body.ios-standalone .mobile-menu {
        top: var(--app-header-offset);
    }
}

@supports (-webkit-touch-callout: none) {
    @media (display-mode: standalone) {
        body {
            padding-top: 0;
        }

        body {
            --ios-safe-top: env(safe-area-inset-top);
            --app-header-safe-top: var(--ios-safe-top);
        }

        body::before {
            height: env(safe-area-inset-top);
        }

        body > header {
            top: var(--app-header-safe-top) !important;
            padding-top: 0 !important;
        }

        body > header > .container {
            padding-top: 0 !important;
        }

        body .mobile-menu {
            top: var(--app-header-offset) !important;
        }
    }
}

@supports (-webkit-touch-callout: none) {
    body > header > .container {
        padding-top: 0 !important;
    }
}

main {
    flex: 1;
}

.main-content {
    flex: 1 0 auto;
    width: 100%;
}

footer {
    flex-shrink: 0;
    margin-top: auto;
}

:root {
    --app-skeleton-fill: #e9eef6;
    --app-skeleton-fill-strong: #dfe7f2;
    --app-skeleton-surface: #ffffff;
    --app-skeleton-surface-muted: #f7f9fc;
    --app-skeleton-border: rgba(148, 163, 184, 0.2);
    --app-skeleton-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
    --app-skeleton-radius-sm: 0.65rem;
    --app-skeleton-radius-md: 0.9rem;
    --app-skeleton-radius-lg: 1.15rem;
}

.app-skeleton-block,
.app-skeleton-line,
.app-skeleton-circle,
.app-skeleton-chip,
.app-skeleton-cell,
.app-skeleton-media,
.app-skeleton-card-block,
.app-skeleton-inline,
.app-skeleton-vote__line {
    --app-skeleton-base: var(--app-skeleton-fill);
    position: relative;
    overflow: hidden;
    color: transparent !important;
    background: var(--app-skeleton-base);
    isolation: isolate;
    pointer-events: none;
    user-select: none;
}

.app-skeleton-on-dark {
    --app-skeleton-base: var(--app-skeleton-fill);
}

.app-skeleton-line {
    display: block;
    height: 0.82rem;
    width: var(--app-skeleton-line-width, 100%);
    border-radius: 999px;
}

.app-skeleton-line-xs {
    height: 0.58rem;
    width: var(--app-skeleton-line-width, 24%);
}

.app-skeleton-line-sm {
    height: 0.68rem;
    width: var(--app-skeleton-line-width, 38%);
}

.app-skeleton-line-md {
    width: var(--app-skeleton-line-width, 60%);
}

.app-skeleton-line-lg {
    height: 1rem;
    width: var(--app-skeleton-line-width, 88%);
}

.app-skeleton-circle {
    width: var(--app-skeleton-size, 3.2rem);
    height: var(--app-skeleton-size, 3.2rem);
    border-radius: 999px;
    flex: 0 0 auto;
}

.app-skeleton-block,
.app-skeleton-media,
.app-skeleton-card-block {
    border-radius: var(--app-skeleton-radius, var(--app-skeleton-radius-md));
}

.app-skeleton-chip {
    display: inline-block;
    min-width: var(--app-skeleton-chip-width, 8rem);
    height: var(--app-skeleton-chip-height, 2.25rem);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.app-skeleton-cell {
    display: block;
    width: var(--app-skeleton-line-width, 100%);
    height: 0.875rem;
    border-radius: 999px;
}

.app-skeleton-card {
    pointer-events: none;
}

.app-skeleton-card .club-feed-card-body {
    display: grid;
    gap: 0.8rem;
}

.app-skeleton-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.app-skeleton-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 0.45rem;
}

.app-skeleton-table-row td {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

.app-skeleton-inline {
    display: inline-block;
    width: var(--app-skeleton-inline-width, 9rem);
    height: 0.9rem;
    max-width: 100%;
    border-radius: 999px;
    vertical-align: middle;
}

.app-skeleton-inline--wide {
    width: var(--app-skeleton-inline-width, 12.5rem);
}

.app-skeleton-inline--medium {
    width: var(--app-skeleton-inline-width, 9rem);
}

.app-skeleton-vote {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 22rem;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    border-radius: var(--app-skeleton-radius-md);
    background: var(--app-skeleton-surface);
    border: 1px solid var(--app-skeleton-border);
}

.app-skeleton-vote__line {
    height: 0.95rem;
    border-radius: 999px;
}

.app-skeleton-vote__line--lg {
    width: 72%;
    margin: 0 auto;
}

.app-skeleton-vote__line--md {
    width: 88%;
    margin: 0 auto;
}

.app-skeleton-shell {
    display: grid;
    gap: 1rem;
}

.app-skeleton-surface {
    border: 1px solid var(--app-skeleton-border);
    border-radius: var(--app-skeleton-radius-lg);
    background: var(--app-skeleton-surface);
    box-shadow: var(--app-skeleton-shadow);
    overflow: hidden;
}

.app-skeleton-grid {
    display: grid;
    gap: 1rem;
}

.app-bottom-nav,
.club-feed-bottom-nav {
    position: fixed;
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--app-bottom-nav-edge-gap));
    z-index: 70;
    display: none;
    align-items: stretch;
    justify-content: stretch;
    gap: 0.35rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: var(--app-bottom-nav-base-height);
    padding: 0.46rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1.15rem;
    background: rgba(250, 252, 255, 0.97);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
    transform: none;
    contain: none;
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
}

.app-bottom-nav::before,
.club-feed-bottom-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.2));
    pointer-events: none;
}

.app-bottom-nav-item,
.club-feed-bottom-nav-item {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.26rem;
    min-height: 58px;
    padding: 0.42rem 0.3rem;
    border-radius: 0.9rem;
    color: #667085;
    text-decoration: none;
    font-size: 0.66rem;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: 0.01em;
    text-align: center;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.app-bottom-nav-item i,
.app-bottom-nav-item svg,
.club-feed-bottom-nav-item i,
.club-feed-bottom-nav-item svg {
    width: 1.08rem;
    height: 1.08rem;
    flex: 0 0 auto;
}

.app-bottom-nav-item span,
.club-feed-bottom-nav-item span {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (hover: hover) and (pointer: fine) {
    .app-bottom-nav-item:hover,
    .club-feed-bottom-nav-item:hover {
        color: #0f172a;
        transform: translateY(-1px);
    }
}

.app-bottom-nav-item.is-active,
.app-bottom-nav-item[aria-current="page"],
.club-feed-bottom-nav-item.is-active,
.club-feed-bottom-nav-item[aria-current="page"] {
    background: #ffffff;
    color: #1d4ed8;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.18);
}

.app-bottom-nav-item--cabinet,
.club-feed-bottom-nav-item--cabinet {
    display: inline-flex;
}

body:not(.player-authenticated):not(.player-cabinet-page) .app-bottom-nav,
body:not(.player-authenticated):not(.player-cabinet-page) .club-feed-bottom-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body:not(.player-authenticated):not(.player-cabinet-page) .app-bottom-nav-item--cabinet,
body:not(.player-authenticated):not(.player-cabinet-page) .club-feed-bottom-nav-item--cabinet {
    display: none !important;
}

i[data-feather],
[data-feather] {
    display: inline-block;
    vertical-align: middle;
    flex: 0 0 auto;
}

@media (max-width: 767px) {
    body.has-app-bottom-nav {
        padding-bottom: calc(var(--app-bottom-nav-base-height) + env(safe-area-inset-bottom, 0px) + 0.35rem);
    }

    body.has-app-bottom-nav footer {
        display: none !important;
    }

    .app-bottom-nav,
    .club-feed-bottom-nav {
        display: grid;
    }
}

/* Mobile Menu - общие стили */
.mobile-menu {
    display: block;
    position: fixed;
    top: var(--app-header-offset) !important;
    left: 0;
    right: 0;
    background: black !important;
    border-top: 2px solid #3B82F6 !important;
    z-index: 40;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.mobile-menu a {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem;
    padding: 15px 24px !important;
    border-bottom: 1px solid #1F2937 !important;
    text-decoration: none !important;
    color: white !important;
    transition: all 0.3s ease;
    flex-wrap: nowrap;
}

.mobile-menu a svg,
.mobile-menu a i {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
}

.mobile-menu .mobile-menu-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-menu-button svg,
.mobile-menu-button i,
.mobile-menu-button .feather {
    width: 1.5rem;
    height: 1.5rem;
    display: block;
    flex: 0 0 auto;
}

.mobile-menu.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-10px) !important;
}

.mobile-menu a:hover {
    background-color: rgba(59, 130, 246, 0.1);
    padding-left: 28px;
}

.mobile-menu a.text-blue-400 {
    background-color: rgba(59, 130, 246, 0.05);
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu-section {
    padding: 14px 24px 16px;
    border-top: 1px solid #1f2937;
    background: #05070b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.mobile-menu-section__title {
    margin-bottom: 0;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.mobile-menu-app-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
    flex-shrink: 0;
    flex: 1 1 220px;
}

.mobile-menu-app-btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: transparent;
    color: #f3f4f6;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.mobile-menu-app-btn:hover,
.mobile-menu-app-btn:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    outline: none;
}

.mobile-menu-app-btn img,
.mobile-menu-app-btn svg {
    width: 13px;
    height: 13px;
    display: block;
    flex-shrink: 0;
}

.mobile-menu-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    flex-shrink: 0;
    flex: 1 1 220px;
}

.mobile-menu-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #1f2937;
    color: #e5e7eb;
    text-decoration: none;
    background: transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mobile-menu-social-link:hover,
.mobile-menu-social-link:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    outline: none;
}

.mobile-menu-social-link svg,
.mobile-menu-social-link i {
    width: 16px;
    height: 16px;
}

@media (max-width: 359px) {
    .mobile-menu-section {
        gap: 10px;
        padding: 12px 16px 14px;
    }

    .mobile-menu-section__title {
        font-size: 10px;
    }

    .mobile-menu-app-actions,
    .mobile-menu-social-links {
        gap: 6px;
    }

    .mobile-menu-app-btn {
        min-height: 30px;
        padding: 0 8px;
        font-size: 11px;
    }

    .mobile-menu-social-link {
        width: 32px;
        height: 32px;
    }
}

/* Stats Cards */
.stats-card {
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

/* Player Row Hover */
.player-row {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.player-row:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

/* Leader Card Animation */
.leader-card {
    transition: all 0.3s ease;
}

.leader-card:hover {
    transform: scale(1.02);
}

/* Media Cards */
.media-card {
    transition: all 0.3s ease;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Match Cards */
.match-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 180px;
}

.match-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Team Highlight */
.team-row-highlight {
    background-color: rgba(59, 130, 246, 0.1);
    border-left: 4px solid #3B82F6;
}

/* Live Badge Pulse */
.live-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        background-color: #EF4444;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        background-color: #DC2626;
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

/* Tab Active State */
.tab-active {
    border-bottom: 3px solid #3B82F6;
    color: #3B82F6;
}

/* Gallery Items */
.gallery-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Gentle Pulse Animation */
@keyframes gentle-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.animate-gentle-pulse {
    animation: gentle-pulse 3s ease-in-out infinite;
}

/* Gradient Animation */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Shadow Utilities */
.shadow-team-card {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
                0 4px 6px -2px rgba(0, 0, 0, 0.05),
                0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Responsive Mobile Adaptations */
@media (max-width: 640px) {
    .match-card {
        margin-bottom: 0.75rem;
        min-height: 160px;
    }

    .match-card:hover {
        transform: translateY(-2px);
    }
}

/* ==================== PLAYER CARDS ==================== */

.player-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.15);
}

.player-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f3f4f6;
}

@media (min-width: 768px) {
    .player-image-container {
        height: 260px;
    }
}

.player-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s ease;
}

.player-card:hover .player-image {
    transform: scale(1.05);
}

/* ==================== MODALS ==================== */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    animation: slideUp 0.3s ease;
    width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ==================== IMAGE MODAL ==================== */

.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(0, 0, 0, 0.95);
    cursor: zoom-out;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ==================== TABLE RESPONSIVE ==================== */

@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .table-container table {
        min-width: 600px;
    }
}

.table-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.table-row:hover {
    background-color: #f3f4f6;
    transform: translateX(5px);
}

/* ==================== MOBILE PLAYER CARDS ==================== */

.mobile-player-card {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.mobile-player-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .mobile-player-card {
        display: block;
    }
    
    .desktop-table {
        display: none;
    }
}

/* ==================== VIEW TOGGLE ==================== */

.view-toggle {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: 20px;
    z-index: 50;
    background: white;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 6px;
    display: flex;
    gap: 3px;
}

@media (min-width: 768px) {
    .view-toggle {
        bottom: 30px;
        right: 30px;
        padding: 8px;
        gap: 4px;
    }
}

@media (max-width: 768px) {
    .view-toggle {
        display: none !important;
    }
}

.view-toggle button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

@media (min-width: 768px) {
    .view-toggle button {
        width: 44px;
        height: 44px;
    }
}

.view-toggle button:hover {
    transform: scale(1.1);
}

/* ==================== LIGHTBOX ==================== */

.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}

.lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    animation: zoomIn 0.3s;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: #3b82f6;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 60px;
    cursor: pointer;
    padding: 0 20px;
    user-select: none;
    transition: 0.3s;
}

.lightbox-nav:hover {
    color: #3b82f6;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* ==================== NEWS CARDS ==================== */

.news-card {
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.news-card .news-image {
    transition: transform 0.3s ease;
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
}

 .rules-modal-header,
 .rules-modal-body,
 .rules-modal-actions {
     padding-left: 28px;
     padding-right: 28px;
 }

 .rules-modal-header {
     padding-top: 22px;
     padding-bottom: 18px;
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 12px;
 }

 .rules-modal-body {
     padding-top: 18px;
     padding-bottom: 18px;
 }

 .rules-modal-actions {
     padding-top: 16px;
     padding-bottom: 20px;
     display: flex;
     flex-direction: column;
     gap: 8px;
 }

 @media (min-width: 640px) {
     .rules-modal-actions {
         flex-direction: row;
         justify-content: flex-end;
     }
 }

 #pcRulesModalOk {
     background: #0f172a;
     color: #ffffff;
     border: 0;
 }

 #pcRulesRevokeConfirm {
     background: #e11d48;
     color: #ffffff;
     border: 0;
 }

 #pcRulesRevokeCancel {
     background: #ffffff;
     color: #111827;
     border: 1px solid #e5e7eb;
 }
