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

/* Sticky Footer */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

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

footer {
    flex-shrink: 0;
}

/* Mobile Menu - общие стили */
.mobile-menu {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: black;
    border-top: 2px solid #3B82F6;
    z-index: 40;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.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;
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 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);
    }
}

/* ==================== SKELETON LOADING ==================== */

.skeleton-loading {
    position: relative;
    overflow: hidden;
    background: #e5e7eb;
}

.skeleton-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.5) 50%, 
        transparent 100%);
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Skeleton Shapes */
.skeleton-text {
    height: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 40%;
}

.skeleton-text.medium {
    width: 70%;
}

.skeleton-text.long {
    width: 90%;
}

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-image {
    border-radius: 0.5rem;
}

/* Skeleton Card */
.skeleton-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.skeleton-card .skeleton-image {
    height: 12rem;
    background: #e5e7eb;
}

.skeleton-card .skeleton-body {
    padding: 1rem;
}

/* ==================== 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;
}

.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;
}

.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: 20px;
    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;
}
