/**
 * common.css - Общие стили для всех страниц сайта
 * Извлечено из inline стилей для улучшения кэширования и поддержки
 */

/* ====== STICKY FOOTER ====== */
html, body {
    height: 100%;
}

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

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

main {
    flex: 1;
}

footer {
    flex-shrink: 0;
}

/* ====== МОБИЛЬНОЕ МЕНЮ ====== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: black;
    border-top: 2px solid blue;
    z-index: 40;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

.mobile-menu a:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

/* ====== КАРТОЧКИ ИГРОКОВ ====== */
.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);
}

/* ====== МЕДИА КАРТОЧКИ ====== */
.media-card {
    transition: all 0.3s ease;
}

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

.play-button {
    transition: all 0.3s ease;
}

.media-card:hover .play-button {
    transform: scale(1.1);
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
}

.photo-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

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

.video-thumbnail {
    position: relative;
    overflow: hidden;
    padding-bottom: 56.25%;
    height: 0;
}

.video-thumbnail iframe,
.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ====== НОВОСТИ КАРТОЧКИ ====== */
.news-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(229, 231, 235, 0.8);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-card:hover::before {
    opacity: 1;
}

.main-news-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
}

.main-news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ef4444, #f97316, #eab308);
    z-index: 1;
}

.main-news-card:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

/* ====== ТАБЛИЦА НА МОБИЛЬНЫХ ====== */
@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;
    }
}

/* ====== НЕДЕЛЬНЫЙ КАЛЕНДАРЬ ====== */
.match-day {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    color: white !important;
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
    position: relative;
    transition: all 0.3s ease;
}

.match-day:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
    z-index: 20;
}

/* ====== АДАПТИВНЫЕ КНОПКИ ====== */
.lineup-button-mobile {
    display: block;
    margin-bottom: 1rem;
}

.lineup-button-desktop {
    display: none;
}

@media (min-width: 640px) {
    .lineup-button-mobile {
        display: none;
    }
    
    .lineup-button-desktop {
        display: block;
    }
}

/* ====== YOUTUBE PLAYER ====== */
#featured-video-iframe {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

@media (max-width: 768px) {
    #featured-video-iframe {
        min-height: 200px;
    }
}

/* ====== НОВОГОДНЯЯ ГИРЛЯНДА (реалистичная) ====== */
/* Предотвращаем горизонтальный скролл от гирлянды */
header {
    overflow-x: clip;
}

.christmas-garland {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: 16px;
	background: transparent;
	z-index: 45;
	overflow: visible;
	pointer-events: none;
	clip-path: inset(0 -5px -15px -5px);
 }

body:not(.christmas-theme-ready) .christmas-garland,
body:not(.christmas-theme-ready) .winter-snow,
body:not(.christmas-theme-ready) .winter-logo-wrapper::before,
body:not(.christmas-theme-ready) .winter-logo-wrapper::after {
    display: none !important;
}

/* Скрытие новогодних элементов при выключенной теме */
body.no-christmas-theme .christmas-garland,
body.no-christmas-theme .winter-snow,
body.no-christmas-theme .winter-logo-wrapper::before,
body.no-christmas-theme .winter-logo-wrapper::after {
    display: none !important;
}

body.no-christmas-theme .lineup-button-mobile button img[src*="santa"],
body.no-christmas-theme .lineup-button-desktop button img[src*="santa"] {
    display: none !important;
}

body.no-christmas-theme .lineup-button-mobile button::before,
body.no-christmas-theme .lineup-button-desktop button::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='9' cy='7' r='4'%3E%3C/circle%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'%3E%3C/path%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Основной провод гирлянды */
.christmas-garland-wire {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
}

.christmas-garland-wire svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.garland-wire-path {
    fill: none;
    stroke: #1a1a1a;
    stroke-width: 1.2;
    stroke-linecap: round;
}

/* Запасной цвет провода если градиент не поддерживается */
.garland-wire-path-fallback {
    fill: none;
    stroke: #1a1a1a;
    stroke-width: 3.5;
    stroke-linecap: round;
}

.christmas-garland-lights {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 100%;
	width: 100%;
}

/* Каждая лампочка гирлянды */
.christmas-bulb {
    position: absolute;
    width: 5px;
    height: 8px;
    transform-origin: center top;
    animation-duration: var(--dur, 3s);
    animation-delay: var(--delay, 0s);
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

/* Цоколь лампочки (металлическая часть) */
.christmas-bulb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2.5px;
    height: 2px;
    background: linear-gradient(180deg, #999 0%, #444 100%);
    border-radius: 1px 1px 0 0;
}

/* Стеклянная колба лампочки */
.christmas-bulb::after {
    content: '';
    position: absolute;
    top: 1.5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4.5px;
    height: 6px;
    background: 
        radial-gradient(ellipse 45% 35% at 30% 25%, rgba(255,255,255,0.9) 0%, transparent 50%),
        radial-gradient(ellipse 100% 100% at 50% 50%, var(--bulb-color, #ffd700) 0%, var(--bulb-dark, #b8860b) 90%);
    border-radius: 35% 35% 50% 50% / 20% 20% 65% 65%;
    box-shadow:
        0 0 2px var(--bulb-glow, rgba(255,215,0,0.8)),
        0 0 4px var(--bulb-glow, rgba(255,215,0,0.4));
    opacity: var(--intensity, 1);
}

/* Анимации свечения лампочек */
.christmas-bulb.pattern-steady {
    animation-name: bulb-steady;
}

.christmas-bulb.pattern-flicker {
    animation-name: bulb-flicker-realistic;
}

.christmas-bulb.pattern-twinkle {
    animation-name: bulb-twinkle-realistic;
}

.christmas-bulb.pattern-glow {
    animation-name: bulb-glow-pulse;
}

@keyframes bulb-steady {
    0%, 100% { 
        transform: rotate(var(--swing-start, -1deg));
    }
    50% { 
        transform: rotate(var(--swing-end, 1deg));
    }
}

/* Реалистичное мерцание как у старых лампочек */
@keyframes bulb-flicker-realistic {
    0%, 100% { 
        --intensity: 1;
        transform: rotate(var(--swing-start, -1deg));
    }
    10% { --intensity: 0.95; }
    20% { --intensity: 0.6; }
    21% { --intensity: 1; }
    35% { --intensity: 0.85; }
    40% { --intensity: 0.4; }
    41% { --intensity: 0.9; }
    50% { 
        --intensity: 1;
        transform: rotate(var(--swing-end, 1deg));
    }
    65% { --intensity: 0.7; }
    66% { --intensity: 1; }
    80% { --intensity: 0.95; }
}

/* Плавное мерцание */
@keyframes bulb-twinkle-realistic {
    0%, 100% { 
        --intensity: 0.5;
        transform: rotate(var(--swing-start, -1deg));
    }
    50% { 
        --intensity: 1;
        transform: rotate(var(--swing-end, 1deg));
    }
}

/* Пульсация свечения */
@keyframes bulb-glow-pulse {
    0%, 100% { 
        --intensity: 0.7;
        transform: rotate(var(--swing-start, 0deg));
    }
    50% { 
        --intensity: 1;
        transform: rotate(var(--swing-end, 0deg));
    }
}

/* Отражение света на поверхности под гирляндой */
.christmas-garland-reflection {
    display: none;
}

/* Адаптив для мобильных */
@media (max-width: 640px) {
    .christmas-garland {
        height: 14px;
    }
    
    .garland-wire-path {
        stroke-width: 1;
    }
    
    .christmas-bulb {
        width: 4px;
        height: 6px;
    }
    
    .christmas-bulb::before {
        width: 2px;
        height: 1.5px;
    }
    
    .christmas-bulb::after {
        top: 1px;
        width: 3.5px;
        height: 4.5px;
        box-shadow:
            0 0 1.5px var(--bulb-glow, rgba(255,215,0,0.8)),
            0 0 3px var(--bulb-glow, rgba(255,215,0,0.4));
    }
}
