/* ========================================
   ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ СТРАНИЦ
   3D Марафон "50 зверей"
   ======================================== */

:root {
    --primary-green: #5A8031;
    --light-green: #4CAF50;
    --dark-green: #2E7D32;
    --bg-color: #F7F5F0;
    --white: #ffffff;
    --text-color: #333333;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-color);
    font-family: 'Consolas', monospace;
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
}

/* ========================================
   HEADER И НАВИГАЦИЯ
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1000;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo {
    height: 50px;
    width: auto;
}

/* Timer styles */
.countdown-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 15px;
    background: transparent;
    border-radius: 10px;
    color: black;
    font-weight: bold;
    font-size: 18px;
}

.countdown-timer.expired {
    color: #dc3545;
}

.countdown-timer i {
    font-size: 18px;
}

.countdown-time {
    font-family: 'Consolas', monospace;
    font-size: 18px;
    min-width: 180px;
    text-align: center;
    color: black;
}

.timer-label {
    font-size: 14px;
    opacity: 0.9;
    display: block;
    margin-top: 2px;
    color: black;
}

/* Hamburger button */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-green);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Dropdown menu */
.dropdown-menu {
    position: fixed;
    top: 60px;
    left: 0;
    width: 300px;
    background-color: var(--bg-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    padding: 20px 0;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 999;
}

.dropdown-menu.active {
    display: flex;
}

.dropdown-menu a {
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 12px;
    color: black;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    width: 90%;
    text-align: center;
}

.dropdown-menu a:hover {
    color: white;
    background-color: var(--primary-green);
    transform: translateX(5px);
}

/* ========================================
   КНОПКИ
   ======================================== */
.btn {
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    text-decoration: none;
    color: white;
}

.btn:active {
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #45a049, #388E3C);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #00BCD4, #0097A7);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #0097A7, #00838F);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #F57C00, #E65100);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    color: white;
}

.btn-outline-success {
    background: transparent;
    border: 2px solid #4CAF50 !important;
    color: #4CAF50;
}

.btn-outline-success:hover {
    background: #4CAF50;
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid #6c757d !important;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
}

/* ========================================
   КАРТОЧКИ И КОНТЕЙНЕРЫ
   ======================================== */
.card-container {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 40px;
    margin: 100px auto 40px;
    max-width: 1200px;
}

.page-title {
    font-size: 36px;
    color: var(--primary-green);
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--primary-green);
    padding-bottom: 15px;
}

/* ========================================
   НАВИГАЦИОННЫЕ ССЫЛКИ
   ======================================== */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--light-green);
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 5px;
    background: #f8f9fa;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover {
    background: var(--light-green);
    color: white;
}

/* ========================================
   ФОРМЫ
   ======================================== */
.form-label {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 8px;
}

.form-label.required::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 12px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--light-green);
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

/* ========================================
   ALERT СООБЩЕНИЯ
   ======================================== */
.alert {
    border-radius: 10px;
}

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */
@media (max-width: 768px) {
    body {
        background: none !important;
    }
    
    .header {
        padding: 0 15px;
    }

    .header-logo {
        height: 40px;
    }

    .dropdown-menu {
        width: 100%;
    }

    .card-container,
    .registration-card,
    .organizer-card,
    .table-container,
    .stats-container,
    .login-container {
        padding: 15px;
        margin: 60px 0 0;
        border-radius: 0;
        box-shadow: none;
        background: none;
        max-width: 100%;
    }

    .page-title {
        font-size: 22px;
    }

    .btn {
        padding: 10px 15px;
        font-size: 14px;
        width: 100%;
        margin-bottom: 5px;
    }

    .countdown-timer {
        display: flex;
        padding: 4px 10px;
        gap: 8px;
    }
    .countdown-timer i {
        font-size: 16px;
    }
    .countdown-time {
        font-size: 14px;
        min-width: 120px;
    }
    .timer-label {
        font-size: 10px;
    }
}

/* ========================================
   УТИЛИТЫ
   ======================================== */
.text-center { text-align: center; }
.text-muted { color: #6c757d; }
.fw-bold { font-weight: bold; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.fs-4 { font-size: 1..5rem; }
.fs-5 { font-size: 1.25rem; }
.fs-6 { font-size: 1rem; }
