/* assets/app.css */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; font-style: normal !important; }

/* БАЗОВЫЕ НАСТРОЙКИ */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

/* --- ШАПКА --- */
.tg-header { 
    background: #000000; 
    color: #ffffff; 
    padding: 0 15px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    position: fixed; 
    top: 0; 
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 9000;
    padding-top: env(safe-area-inset-top);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-logo { height: 28px; width: 28px; margin-right: 12px; border-radius: 4px; border: 1px solid #333; }
.header-title { font-size: 14px; font-weight: 800; margin: 0; letter-spacing: 0.5px; text-transform: uppercase; }
.header-status { font-size: 10px; opacity: 0.6; margin: 0; }

/* --- КОНТЕЙНЕР СКРОЛЛА --- */
#chat-container { 
    flex: 1; 
    overflow-y: auto; 
    padding: 10px; 
    padding-top: calc(70px + env(safe-area-inset-top)); 
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
}

/* --- КАРТОЧКИ --- */
.content-card { 
    background: #ffffff; 
    border: 1px solid #eeeeee; 
    margin-bottom: 12px; 
    width: 100%; 
    overflow: hidden;
    border-radius: 8px;
}

/* --- КНОПКИ МАТЧЕЙ --- */
.tg-btn { 
    background: white; 
    border: none; 
    border-bottom: 1px solid #f7f7f7; 
    padding: 16px 12px; 
    width: 100%; 
    text-align: left; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}
.tg-btn:active { background: #fafafa; }
.btn-text { font-size: 13px; color: #000; flex: 1; font-weight: 500; }
.btn-time { font-size: 11px; color: #999; margin-right: 10px; font-weight: 700; }

.category-header { 
    background: #000000; 
    padding: 10px 12px; 
    font-weight: 800; 
    color: #ffffff; 
    font-size: 10px; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}
.league-title { 
    font-size: 10px; 
    font-weight: 800; 
    color: #999; 
    padding: 15px 12px 6px 12px; 
    text-transform: uppercase; 
}

.btn-black { 
    background: #000000; 
    color: #ffffff; 
    border: none; 
    padding: 14px 28px; 
    border-radius: 6px; 
    font-weight: 700; 
    font-size: 13px; 
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- ТЕМНАЯ НИЖНЯЯ НАВИГАЦИЯ (ФИКС ДЛЯ IPHONE) --- */
.nav-bar { 
    position: fixed !important; 
    bottom: 0 !important; 
    left: 0 !important;
    width: 100% !important; 
    /* 1. Увеличиваем общую высоту панели: 65px для кнопок + зона Айфона */
    height: calc(65px + env(safe-area-inset-bottom)) !important; 
    background: #000000 !important; 
    border-top: 1px solid #111111 !important; 
    display: flex !important; 
    justify-content: space-around !important; 
    /* 2. Выравниваем элементы по ВЕРХНЕМУ краю панели */
    align-items: flex-start !important; 
    z-index: 10000 !important; 
    padding-bottom: env(safe-area-inset-bottom) !important; 
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

.nav-item { 
    border: none; 
    background: none; 
    color: #444444; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    /* 3. Фиксируем высоту самих кнопок на 65px */
    justify-content: center; 
    height: 65px !important; 
    flex: 1; 
    cursor: pointer; 
    transition: all 0.2s ease;
}

.nav-item i { font-size: 19px; margin-bottom: 4px; }
.nav-item span { font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }

/* АКТИВНОЕ СОСТОЯНИЕ — ЗЕЛЕНЫЙ */
.nav-item.active { 
    color: #a8ff78 !important; 
}

/* --- КРАСНАЯ ТОЧКА LIVE --- */
.icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.live-indicator-dot {
    position: absolute;
    top: -2px;
    right: -6px;
    width: 7px;
    height: 7px;
    background-color: #ff3b30 !important; /* ЯРКО-КРАСНЫЙ */
    border-radius: 50%;
    border: 1.5px solid #000; /* Черная обводка для контраста */
    z-index: 5;
    display: block !important;
    animation: blink-live 1s infinite;
}

@keyframes blink-live {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* ПРОФИЛЬ, АНАЛИЗ И АВТОРИЗАЦИЯ */
.profile-simple { background: #fff; padding: 20px; }
.profile-title { font-size: 22px; font-weight: 900; color: #000; margin-bottom: 30px; text-transform: uppercase; }
.profile-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid #f0f0f0; }
.profile-label { font-size: 12px; color: #999; text-transform: uppercase; font-weight: 600; }
.profile-value { font-size: 14px; font-weight: 700; color: #000; }
.analysis-text { font-size: 14px; line-height: 1.6; color: #111; padding: 20px; }
.btn-back { background: none; color: #000; border: 1px solid #000; padding: 8px 16px; border-radius: 4px; font-size: 11px; font-weight: 700; margin-bottom: 15px; cursor: pointer; text-transform: uppercase; }
#auth-screen { position: fixed; inset: 0; background: #f9fafb; z-index: 15000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: #ffffff; padding: 40px 28px; border-radius: 16px; border: 1px solid #e5e7eb; width: 100%; max-width: 400px; text-align: center; }
#email-input { width: 100%; padding: 12px 16px; border-radius: 8px; border: 1px solid #d1d5db; margin-bottom: 20px; outline: none; font-size: 15px; }

/* ФИКС КЭФОВ ДЛЯ ANDROID */
.live-odd-btn {
    background: #f4f4f4; padding: 0 5px; border-radius: 4px; font-size: 11px !important; 
    font-weight: 800; height: 22px; min-width: 40px; color: #333;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #eee; text-size-adjust: none;
}
.live-odds-wrapper { display: flex; gap: 4px; margin-top: 8px; align-items: center; }

/* --- СТИЛЬНЫЙ ЛОАДЕР --- */
#loading-spinner {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.7); /* Полупрозрачный белый */
    backdrop-filter: blur(5px); /* Размытие заднего плана */
    -webkit-backdrop-filter: blur(5px);
    display: none; /* Включается через JS */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 30000; /* Выше всех элементов */
    transition: opacity 0.2s ease-in-out;
    opacity: 0;
}

.spinner-ring {
    width: 44px;
    height: 44px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2ecc71; /* Твой зеленый акцент */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    margin-top: 16px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Плавное появление контента */
#dynamic-content {
    animation: fadeIn 0.3s ease-out;
}

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