/* =========================================
   1. ОСНОВНЫЕ ПЕРЕМЕННЫЕ И СБРОС
   ========================================= */
:root {
    --wf-orange: #ff5a00;
    --wf-red: #d62828;
    --wf-dark: #121212;
    --wf-grey: #1e2124;
    --wf-light: #e0e0e0;
}

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

body {
    background-color: var(--wf-dark);
    color: var(--wf-light);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --- ФОН --- */
.bg-grid {
    position: fixed; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px; z-index: -2;
}
.vignette {
    position: fixed; width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 40%, #000000 100%);
    z-index: -1; pointer-events: none;
}

/* --- ТИПОГРАФИКА --- */
h1, h2, h3 { font-family: 'Teko', sans-serif; text-transform: uppercase; letter-spacing: 1px; line-height: 1; }
.orange-text { color: var(--wf-orange); }
.hero-title { font-size: 48px; margin-bottom: 30px; text-align: center; }

/* --- НАВИГАЦИЯ --- */
.navbar {
    background: rgba(20, 20, 20, 0.95);
    border-bottom: 2px solid var(--wf-grey);
    padding: 0 50px;
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    height: 70px;
}
.nav-header { display: flex; align-items: center; justify-content: space-between; width: auto; }
.menu-toggle { display: none; }
.logo a { font-family: 'Teko', sans-serif; font-size: 32px; color: white; text-decoration: none; display: flex; align-items: center; gap: 5px; }
.version { font-size: 12px; background: var(--wf-grey); padding: 2px 5px; border-radius: 2px; color: #888; }
.nav-collapse { display: flex; align-items: center; gap: 30px; width: 100%; justify-content: space-between; margin-left: 40px;}
.nav-center { display: flex; gap: 30px; }
.auth { display: flex; align-items: center; gap: 15px; }
.nav-item { font-family: 'Teko', sans-serif; font-size: 22px; color: #888; text-decoration: none; transition: 0.3s; }
.nav-item:hover, .nav-item.active { color: white; }

/* --- КНОПКИ --- */
.wf-btn {
    display: inline-block; padding: 8px 25px; text-decoration: none;
    font-family: 'Teko', sans-serif; font-size: 20px; text-transform: uppercase;
    letter-spacing: 1px; transform: skewX(-20deg); transition: 0.3s; border: 1px solid transparent; cursor: pointer;
}
.wf-btn span { display: block; transform: skewX(20deg); }
.wf-btn-red { background: var(--wf-orange); color: black; font-weight: 700; }
.wf-btn-red:hover { background: white; box-shadow: 0 0 15px rgba(255, 90, 0, 0.5); }
.wf-btn-outline { border: 1px solid #555; color: white; }
.wf-btn-outline:hover { border-color: var(--wf-orange); color: var(--wf-orange); }
.logout-link { color: #555; font-size: 20px; } .logout-link:hover { color: var(--wf-red); }

/* --- КОНТЕЙНЕРЫ --- */
.main-wrapper { max-width: 1200px; margin: 0 auto; width: 100%; padding: 40px 20px; flex: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* --- ГЛАВНАЯ --- */
.hero { text-align: center; margin-top: 60px; }
.hero h1 { font-size: 90px; margin-bottom: 10px; text-shadow: 0 10px 30px rgba(0,0,0,0.8); }
.hero p { font-size: 22px; color: #888; margin-bottom: 50px; }
.search-box { max-width: 600px; margin: 0 auto; position: relative; }
.search-box input {
    width: 100%; background: rgba(0,0,0,0.5); border: 2px solid #333;
    padding: 20px; font-size: 24px; color: white; font-family: 'Teko'; text-transform: uppercase;
    clip-path: polygon(0 0, 100% 0, 100% 80%, 97% 100%, 0 100%);
}
.search-box button {
    position: absolute; right: 5px; top: 5px; height: calc(100% - 10px);
    background: var(--wf-grey); border: none; color: white; padding: 0 20px;
    font-family: 'Teko'; font-size: 22px; cursor: pointer; transition: 0.2s;
}

/* --- ЛЕНТА --- */
.feed-header-area { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-bottom: 2px solid #222; padding-bottom: 15px; flex-wrap: wrap; gap: 10px; }
.live-indicator { background: var(--wf-red); color: white; font-size: 12px; padding: 2px 6px; border-radius: 2px; animation: pulse 2s infinite; margin-left: 10px; vertical-align: middle; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

.messenger-feed { display: flex; flex-direction: column; gap: 15px; max-width: 800px; margin: 0 auto; }
.msg-card {
    display: flex; gap: 15px; background: rgba(20, 20, 25, 0.9); border-left: 3px solid #333;
    padding: 15px; border-radius: 0 10px 10px 10px; opacity: 0; transform: translateY(20px); transition: 0.4s;
}
.msg-card.visible { opacity: 1; transform: translateY(0); }
.msg-avatar-container { width: 50px; height: 50px; flex-shrink: 0; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 1px solid #555; }
.avatar-letter { width: 100%; height: 100%; background: #222; border: 1px solid #444; display: flex; justify-content: center; align-items: center; font-size: 24px; color: var(--wf-orange); clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%); }
.msg-content { flex: 1; min-width: 0; }
.msg-header { display: flex; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; }
.msg-nick { font-size: 20px; font-weight: bold; color: white; }
.msg-time { font-size: 12px; color: #666; }
.msg-badge { padding: 2px 8px; font-size: 12px; font-weight: bold; text-transform: uppercase; border-radius: 2px; background: #333; color: #ccc; display: inline-block; margin-bottom: 5px; }
.badge-red { background: rgba(214, 40, 40, 0.2); color: #ff4d4d; border: 1px solid #ff4d4d; }
.badge-orange { background: rgba(255, 90, 0, 0.2); color: #ffaa00; border: 1px solid #ffaa00; }
.badge-yellow { background: rgba(255, 215, 0, 0.2); color: #ffd700; border: 1px solid #ffd700; }
.badge-default { background: #333; color: #aaa; border: 1px solid #555; }

.msg-desc { width: 100%; background: rgba(255,255,255,0.03); padding: 10px; margin: 10px 0; border-left: 2px solid #444; color: #ddd; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.msg-btn { display: inline-block; padding: 5px 15px; background: #2a2a2a; color: white; font-size: 12px; text-decoration: none; border-radius: 20px; border: 1px solid #444; }
.msg-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding-top: 10px; border-top: 1px solid #222; flex-wrap: wrap; gap: 10px; }
.vote-area { display: flex; align-items: center; gap: 10px; background: #111; padding: 5px 10px; border-radius: 20px; border: 1px solid #333; }
.vote-btn { background: none; border: none; color: #666; cursor: pointer; font-size: 16px; }
.vote-btn.active { color: var(--wf-orange); }
.delete-btn { background: rgba(20, 20, 20, 0.5); border: 1px solid #555; color: #888; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-family: 'Teko'; font-size: 16px; margin-right: auto; margin-left: 15px; transition: 0.3s; }
.delete-btn:hover { background: rgba(255, 0, 0, 0.1); border-color: var(--wf-red); color: var(--wf-red); }

/* =========================================
   2. СТИЛИ ПРОФИЛЯ (ВОТ ИХ НЕ ХВАТАЛО!)
   ========================================= */
.profile-container { max-width: 900px; margin: 0 auto; }
.profile-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; margin-top: 30px; }

.profile-card {
    background: #161616;
    border: 1px solid #333;
    padding: 25px;
    border-top: 4px solid var(--wf-orange);
}
.profile-card h3 { margin-bottom: 20px; font-size: 24px; color: white; border-bottom: 1px solid #333; padding-bottom: 10px; }

/* Аватарка */
.avatar-section { text-align: center; }
.avatar-preview {
    width: 150px; height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #333;
    background: #000;
    display: flex; justify-content: center; align-items: center;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.no-avatar { font-size: 60px; color: #555; }

/* Кнопка загрузки файла */
.custom-file-upload {
    display: block; text-align: center; padding: 10px;
    background: #222; color: white; border: 1px dashed #555;
    cursor: pointer; transition: 0.3s; font-family: 'Rajdhani'; font-weight: bold;
}
.custom-file-upload:hover { border-color: var(--wf-orange); color: var(--wf-orange); }
#file-upload { display: none; } /* Скрываем стандартный input */

/* Формы настроек */
.setting-form { margin-bottom: 20px; }
.setting-form label { display: block; margin-bottom: 8px; color: #888; font-size: 14px; font-family: 'Teko'; letter-spacing: 1px; }
.input-group { display: flex; gap: 10px; }
.input-group input { flex: 1; margin-bottom: 0 !important; }
.input-group button { width: auto; padding: 0 20px; background: #333; color: white; border: 1px solid #444; cursor: pointer; font-family: 'Teko'; font-size: 18px; }
.input-group button:hover { background: var(--wf-orange); border-color: var(--wf-orange); color: black; }

.setting-form input {
    width: 100%; padding: 12px; background: #0a0a0a;
    border: 1px solid #333; color: white; margin-bottom: 15px;
    font-family: 'Rajdhani'; font-size: 16px;
}
.btn-full {
    width: 100%; padding: 12px; background: var(--wf-red);
    border: none; color: white; font-weight: bold; cursor: pointer;
    font-family: 'Teko'; font-size: 20px;
}
.btn-full:hover { background: white; color: black; }
.divider { border: 0; border-top: 1px solid #333; margin: 20px 0; }

/* --- ТАБЛИЦЫ И ЛОГИН --- */
.list-table { width: 100%; border-collapse: collapse; }
.list-table th, .list-table td { padding: 10px; border-bottom: 1px solid #222; font-size: 14px; }
.login-box { max-width: 400px; margin: 20px auto; background: #161616; padding: 30px; border: 1px solid #333; border-top: 4px solid var(--wf-orange); }
.login-box input, .login-box select, .login-box textarea { width: 100%; background: #0a0a0a; border: 1px solid #333; padding: 15px; color: white; margin-bottom: 15px; }
.login-box button { width: 100%; background: var(--wf-orange); border: none; padding: 15px; font-family: 'Teko'; font-size: 24px; cursor: pointer; text-transform: uppercase; }
.stat-card { background: #161616; border: 1px solid #333; padding: 20px; text-align: center; border-bottom: 3px solid var(--wf-orange); }
.stat-num { font-family: 'Teko'; font-size: 48px; line-height: 1; }
.stat-label { font-size: 12px; color: #888; letter-spacing: 1px; }

/* --- ОНЛАЙН --- */
.online-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; margin-top: 20px; }
.online-card { background: rgba(20, 20, 20, 0.8); border: 1px solid #333; padding: 15px; text-align: center; border-radius: 5px; position: relative; overflow: hidden; }
.online-card:hover { border-color: var(--wf-orange); background: rgba(30, 30, 30, 1); transform: translateY(-5px); }
.online-card::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: #00ff00; box-shadow: 0 0 10px #00ff00; }
.online-avatar-box { width: 80px; height: 80px; margin: 0 auto 15px; position: relative; }
.online-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 2px solid #444; }
.online-letter { width: 100%; height: 100%; background: #222; color: var(--wf-orange); display: flex; justify-content: center; align-items: center; font-family: 'Teko'; font-size: 40px; border-radius: 50%; border: 2px solid #444; }
.status-dot { width: 15px; height: 15px; background: #00ff00; border-radius: 50%; border: 2px solid #161616; position: absolute; bottom: 5px; right: 5px; box-shadow: 0 0 10px #00ff00; animation: pulse-green 2s infinite; }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(0, 255, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); } }
.online-name { font-family: 'Teko'; font-size: 24px; color: white; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.online-status { font-size: 12px; color: #00ff00; letter-spacing: 2px; font-weight: bold; }

.form-label { color: #888; font-size: 14px; margin-bottom: 5px; display: block; font-family: 'Teko'; letter-spacing: 1px; text-transform: uppercase; }
footer { text-align: center; padding: 30px; color: #444; font-size: 12px; letter-spacing: 2px; margin-top: auto; }

/* =========================================
   3. МОБИЛЬНАЯ АДАПТАЦИЯ
   ========================================= */
@media (max-width: 768px) {
    .navbar { padding: 0 20px; height: auto; min-height: 60px; flex-direction: column; align-items: stretch; }
    .nav-header { height: 60px; display: flex; justify-content: space-between; align-items: center; }
    .menu-toggle { display: block; background: none; border: 2px solid #333; color: white; font-size: 24px; padding: 5px 10px; cursor: pointer; border-radius: 4px; }
    .nav-collapse { display: none; flex-direction: column; width: 100%; margin: 0; padding-bottom: 20px; border-top: 1px solid #333; padding-top: 20px; }
    .nav-collapse.active { display: flex; animation: slideDown 0.3s ease; }
    .nav-center { flex-direction: column; gap: 15px; width: 100%; text-align: center; }
    .auth { flex-direction: column; gap: 15px; width: 100%; }
    .mobile-full-btn { width: 100%; text-align: center; transform: skewX(0); }
    .mobile-full-btn span { transform: skewX(0); }
    
    .hero h1 { font-size: 48px; }
    .hero p { font-size: 16px; }
    .search-box input { font-size: 18px; padding: 15px; }
    
    .msg-card { flex-direction: column; gap: 10px; }
    .msg-avatar-container { margin: 0 auto; }
    .msg-content { text-align: center; }
    .msg-header { flex-direction: column; gap: 5px; text-align: center; }
    .msg-body { justify-content: center; }
    .msg-footer { flex-direction: column; gap: 15px; }
    .vote-area { width: 100%; justify-content: center; }
    .delete-btn { margin: 0 auto; }
    
    .profile-grid { grid-template-columns: 1fr; }
    .stat-card { margin-bottom: 10px; }
    .list-table { display: block; overflow-x: auto; white-space: nowrap; }
    .online-grid { grid-template-columns: 1fr 1fr; }
    .container, .main-wrapper { padding: 20px 10px; }
}

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

/* =========================================
   4. ВОССТАНОВЛЕНИЕ ЛИДЕРБОРДА (ПЬЕДЕСТАЛ)
   ========================================= */

.podium-area {
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Выравнивание по низу */
    gap: 20px;
    margin: 50px auto 80px;
    max-width: 800px;
    height: 350px; /* Фиксируем высоту области */
}

.podium-step {
    width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.podium-bar {
    width: 100%;
    background: linear-gradient(to bottom, #2a2a2a, #111);
    border: 1px solid #333;
    border-bottom: none;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 10px;
    font-size: 60px;
    font-family: 'Teko';
    font-weight: bold;
    color: rgba(255,255,255,0.05);
    position: relative;
}

/* Текстура "штриховка" на столбиках */
.podium-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0,0,0,0.3) 10px,
        rgba(0,0,0,0.3) 20px
    );
    z-index: -1;
}

/* Размеры столбиков */
/* 1 Место */
.step-1 .podium-bar { 
    height: 240px; 
    border-top: 4px solid var(--wf-orange); 
    box-shadow: 0 -20px 40px rgba(255, 90, 0, 0.15);
}
/* 2 Место */
.step-2 .podium-bar { 
    height: 170px; 
    border-top: 4px solid #ccc; 
}
/* 3 Место */
.step-3 .podium-bar { 
    height: 120px; 
    border-top: 4px solid #a05a2c; 
}

/* Текст над столбиками */
.p-nick {
    font-size: 22px;
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
    font-family: 'Teko';
    letter-spacing: 1px;
    /* Чтобы длинные ники не ломали вид */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.p-count {
    font-size: 14px;
    color: var(--wf-orange);
    margin-bottom: 10px;
    font-weight: bold;
}

.crown-icon {
    font-size: 32px;
    color: var(--wf-orange);
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px var(--wf-orange));
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Адаптация пьедестала под телефон */
@media (max-width: 768px) {
    .podium-area {
        gap: 10px;
        height: auto;
        align-items: flex-end;
    }
    .podium-step {
        width: 32%; /* Чтобы все 3 влезли в ряд */
    }
    .step-1 .podium-bar { height: 180px; }
    .step-2 .podium-bar { height: 130px; }
    .step-3 .podium-bar { height: 90px; }
    
    .p-nick { font-size: 16px; }
    .p-count { font-size: 10px; }
    .podium-bar { font-size: 30px; }
}

.share-btn {
    background: transparent; color: #888; border: none;
    font-size: 18px; cursor: pointer; margin-left: 10px;
    transition: 0.3s;
}
.share-btn:hover { color: var(--wf-orange); }

/* --- POPUP ЛИМИТА --- */
.limit-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.limit-modal {
    background: #161616;
    border: 2px solid var(--wf-red);
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 30px rgba(214, 40, 40, 0.4);
    position: relative;
    transform: scale(0.8);
    animation: scaleUp 0.3s ease forwards;
}

.limit-icon { font-size: 60px; color: var(--wf-red); margin-bottom: 20px; }
.limit-modal h2 { font-family: 'Teko'; font-size: 40px; color: white; margin-bottom: 10px; }
.limit-modal p { color: #ccc; font-size: 18px; margin-bottom: 30px; }
.limit-modal button {
    background: var(--wf-red); color: white; border: none;
    padding: 10px 30px; font-family: 'Teko'; font-size: 24px;
    cursor: pointer; text-transform: uppercase;
}
.limit-modal button:hover { background: white; color: black; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleUp { from { transform: scale(0.8); } to { transform: scale(1); } }

/* --- КНОПКА ДОНАТА (ГЛАВНАЯ) --- */
.donate-area {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.donate-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #ffd700; /* Золотой цвет */
    color: #ffd700;
    padding: 12px 35px;
    font-family: 'Teko';
    font-size: 24px;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

/* Эффект при наведении */
.donate-btn:hover {
    background: #ffd700;
    color: #000;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    transform: translateY(-3px);
    font-weight: bold;
}

/* Анимация сердца */
.donate-btn i {
    font-size: 20px;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(1); }
    45% { transform: scale(1.3); }
    60% { transform: scale(1); }
    100% { transform: scale(1); }
}

/* Адаптация под телефон */
@media (max-width: 768px) {
    .donate-btn {
        width: 100%;
        justify-content: center;
    }
}