/* Базовые настройки для эффекта мобильного приложения */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #e9ecef;
    margin: 0;
    display: flex;
    justify-content: center;
    color: #333;
}

#app-container {
    width: 100%;
    max-width: 800px; /* Оптимальная ширина для чтения текста и десктопа */
    min-height: 100vh;
    background-color: #f8f9fa;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    position: relative;
    overflow-x: hidden;
}

/* Шапка */
header {
    background-color: #002D72; /* Темно-синий цвет MLB */
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    font-size: 20px;
    font-weight: bold;
}

#refresh-btn {
    background-color: #D50032; /* Красный цвет MLB */
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

#refresh-btn:active { background-color: #a30026; }

/* Список матчей */
#matches-container { padding: 15px; }

.match-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team-names {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.analyze-btn {
    background-color: #002D72;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

/* Всплывающее окно аналитики */
#analysis-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Окно выезжает снизу, как в iOS */
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#analysis-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 800px;
    height: 75vh;
    border-radius: 20px 20px 0 0;
    padding: 24px;
    box-sizing: border-box;
    position: relative;
    overflow-y: auto;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

#analysis-modal.hidden .modal-content {
    transform: translateY(100%);
}

.close-btn {
    position: absolute;
    top: 15px; right: 20px;
    background: #eee; border: none;
    width: 30px; height: 30px;
    border-radius: 15px;
    font-size: 14px; font-weight: bold;
    cursor: pointer;
}

#modal-match-title {
    margin-top: 0;
    margin-bottom: 15px;
    padding-right: 30px;
    font-size: 20px;
}

#modal-ai-text {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

.loading-text {
    text-align: center;
    color: #888;
    margin-top: 20px;
    font-style: italic;
}
.stats-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-right: 5px;
}
.btn-group {
    display: flex;
}