/* LolzPrize - Зеленый стиль */

:root {
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-light: rgba(16, 185, 129, 0.1);
    --primary-glow: rgba(16, 185, 129, 0.3);
    --secondary: #0f172a;
    --bg-dark: #030712;
    --bg-card: #0f172a;
    --bg-card-hover: #1e293b;
    --bg-input: #1e293b;
    --text: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #1e293b;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --gradient: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.2);
    --radius: 10px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(52, 211, 153, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ========== НАВИГАЦИЯ ========== */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: navSlideIn 0.35s ease both;
}

@keyframes navSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.navbar-content {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    min-width: 0;
}

.logo-copy {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
}

.logo-tagline {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    line-height: 1.1;
    white-space: nowrap;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
    flex-shrink: 0;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--text);
    -webkit-text-fill-color: var(--text);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text);
    background: var(--bg-card-hover);
}

.nav-menu a.active {
    color: var(--primary);
}

.user-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Кнопки чата и уведомлений в шапке */
.nav-tool-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.nav-tool-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.nav-tool-btn.is-active,
.nav-chat-btn.is-active {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.nav-tool-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.user-balance {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    cursor: pointer;
    display: block;
}

.user-avatar-link {
    display: inline-flex;
    flex-shrink: 0;
    line-height: 0;
}

/* ========== КНОПКИ ========== */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--bg-card-hover);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
}

.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: black; }
.btn-full { width: 100%; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }

/* ========== КОНТЕЙНЕР ========== */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
}

/* ========== ФИЛЬТРЫ ========== */
.filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn:hover { color: var(--text); }
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ========== КАРТОЧКИ РОЗЫГРЫШЕЙ ========== */
.giveaways-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.giveaway-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    animation: cardIn 0.45s ease both;
}

.giveaway-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}

.giveaway-image {
    height: 160px;
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
}

.giveaway-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.giveaway-timer {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.giveaway-timer.urgent {
    background: var(--danger);
}

.giveaway-content {
    padding: 1rem;
}

.giveaway-badges {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-active { background: rgba(16, 185, 129, 0.15); color: var(--primary); }
.status-ended { background: rgba(100, 116, 139, 0.15); color: var(--text-muted); }
.status-joined { background: rgba(16, 185, 129, 0.15); color: var(--primary); }

.giveaway-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.giveaway-prize {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.giveaway-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.giveaway-progress {
    background: var(--border);
    height: 4px;
    border-radius: 2px;
    margin-bottom: 0.75rem;
}

.giveaway-progress-bar {
    background: var(--gradient);
    height: 100%;
    border-radius: 2px;
}

.giveaway-actions {
    display: flex;
    gap: 0.5rem;
}

.giveaway-actions .btn { flex: 1; font-size: 0.8rem; padding: 0.5rem; }

/* ========== СТРАНИЦА РОЗЫГРЫША ========== */
.giveaway-detail {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
}

.giveaway-main {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.giveaway-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.giveaway-header-top {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.giveaway-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.giveaway-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.info-item {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-input);
    border-radius: 8px;
}

.info-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.giveaway-body {
    padding: 1.5rem;
}

.giveaway-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* Таймер обратного отсчёта */
.countdown-block {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.countdown-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.countdown-timer {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

/* Комментарии */
.comments-section {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.comments-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.comment-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.comment-form input {
    flex: 1;
    padding: 0.6rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
}

.comment-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.comment-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-input);
    border-radius: 8px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.comment-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.comment-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* ========== САЙДБАР ========== */
.giveaway-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1.25rem;
}

.sidebar-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prize-block {
    text-align: center;
    padding: 1rem;
    background: var(--primary-light);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.prize-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.prize-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Участники */
.participants-list {
    max-height: 250px;
    overflow-y: auto;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.participant-item:last-child { border-bottom: none; }

.participant-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.participant-name {
    flex: 1;
    font-size: 0.85rem;
}

/* Победители */
.winners-block {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
}

.winners-title {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.winner-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0;
    flex-wrap: wrap;
}

.winner-place-row {
    border-bottom: 1px solid rgba(16, 185, 129, 0.25);
    padding-bottom: 0.65rem;
    margin-bottom: 0.35rem;
}

.winner-place-badge,
.participant-place-label {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.winner-place-name {
    flex: 1;
    font-weight: 600;
}

.winner-place-prize,
.participant-win-amount {
    color: var(--primary);
    font-weight: 700;
}

.prize-distribution-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.prize-place-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: var(--bg-input);
    font-size: 0.8rem;
}

.place-rank-1 .winner-place-badge,
.place-rank-1 .participant-place-label,
.prize-place-chip.place-rank-1 {
    color: #fbbf24;
    text-decoration-color: #fbbf24;
}

.place-rank-2 .winner-place-badge,
.place-rank-2 .participant-place-label,
.prize-place-chip.place-rank-2 {
    color: #cbd5e1;
    text-decoration-color: #cbd5e1;
}

.place-rank-3 .winner-place-badge,
.place-rank-3 .participant-place-label,
.prize-place-chip.place-rank-3 {
    color: #d97706;
    text-decoration-color: #d97706;
}

.participant-winner {
    background: rgba(16, 185, 129, 0.08);
    border-radius: 8px;
    padding: 0.35rem 0.45rem;
    margin-bottom: 0.25rem;
}

.participant-winner .participant-name {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.prize-places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.65rem;
}

.prize-place-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.prize-place-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ========== МОДАЛЬНЫЕ ОКНА ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1rem;
    backdrop-filter: blur(5px);
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 450px;
    width: 100%;
    border: 1px solid var(--border);
    animation: modalIn 0.2s ease;
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-create {
    max-width: 520px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

html.modal-open,
html.modal-open body {
    overflow: hidden;
    height: 100%;
    touch-action: none;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
}

.modal-close:hover { color: var(--text); }

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
}

.modal-footer {
    padding: 1rem 1.25rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* ========== ФОРМЫ ========== */
.form-group { margin-bottom: 1rem; }

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.file-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.file-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    border: 1px dashed rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.08);
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.file-upload-btn:hover {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.7);
}

.file-upload-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-upload-preview {
    margin-top: 0.75rem;
}

.file-upload-preview img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    min-width: 0;
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* ========== ПРОФИЛЬ ========== */
.profile-header {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--primary);
}

.profile-info h1 {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.profile-name-row h1 {
    margin: 0;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin-top: 0.75rem;
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.profile-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Баланс */
.balance-card {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.balance-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.balance-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* ========== АДМИНКА ========== */
.admin-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    padding: 0.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.admin-nav a {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--primary);
    color: white;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.admin-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.admin-stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.admin-table {
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg-input);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.admin-table td {
    font-size: 0.9rem;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-form-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-form-row .form-input {
    flex: 1;
    min-width: 160px;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    white-space: nowrap;
}

/* ========== ПУСТОЕ СОСТОЯНИЕ ========== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ========== АЛЕРТЫ ========== */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.alert-success { background: rgba(16, 185, 129, 0.1); border: 1px solid var(--primary); color: var(--primary); }
.alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid var(--danger); color: var(--danger); }
.alert-warning { background: rgba(234, 179, 8, 0.1); border: 1px solid var(--warning); color: var(--warning); }

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 1024px) {
    .giveaway-detail { grid-template-columns: 1fr; }
    .giveaway-info-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .profile-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
    .navbar { padding: 0.65rem 1rem; padding-top: calc(0.65rem + env(safe-area-inset-top)); }
    .navbar-content { flex-wrap: wrap; gap: 0.5rem; }
    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.15rem;
    }
    .nav-menu::-webkit-scrollbar { display: none; }
    .nav-menu a { white-space: nowrap; flex-shrink: 0; }
    .user-section { margin-left: auto; gap: 0.5rem; }
    .user-balance { font-size: 0.8rem; padding: 0.35rem 0.65rem; }
    .logo-text { font-size: 1.1rem; }
    .logo-tagline { font-size: 0.56rem; }
    .container {
        padding: 1rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
    .section-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .section-title { font-size: 1.2rem; }
    .giveaways-grid { grid-template-columns: 1fr; gap: 1rem; }
    .giveaway-card { animation: cardIn 0.45s ease both; }
    .giveaway-card:nth-child(1) { animation-delay: 0.03s; }
    .giveaway-card:nth-child(2) { animation-delay: 0.06s; }
    .giveaway-card:nth-child(3) { animation-delay: 0.09s; }
    .giveaway-card:nth-child(4) { animation-delay: 0.12s; }
    .giveaway-card:hover { transform: none; }
    .giveaway-actions { flex-direction: column; }
    .giveaway-actions .btn { width: 100%; }
    .profile-header { flex-direction: column; text-align: center; padding: 1.5rem 1rem; }
    .profile-prefix-between { justify-content: center; }
    .profile-header .lolz-profile-link { align-self: center; }
    .profile-stats { justify-content: center; flex-wrap: wrap; gap: 1rem; }
    .admin-stats { grid-template-columns: 1fr; }
    .admin-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .admin-nav::-webkit-scrollbar { display: none; }
    .admin-nav a { white-space: nowrap; flex-shrink: 0; }
    .admin-dashboard-grid { grid-template-columns: 1fr; }
    .admin-form-row { flex-direction: column; }
    .admin-form-row .btn { width: 100%; }
    .admin-table { min-width: 640px; font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 0.55rem 0.65rem; }
    .admin-actions { flex-direction: column; align-items: stretch; }
    .admin-actions .btn { width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .balance-actions { flex-direction: column; }
    .balance-amount { font-size: 2rem; }
    .filters { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .filter-btn { flex-shrink: 0; }
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
        padding-top: env(safe-area-inset-top, 0px);
    }
    .modal,
    .modal-create {
        max-width: 100%;
        width: 100%;
        height: auto;
        max-height: calc(100dvh - env(safe-area-inset-top, 0px));
        max-height: calc(100vh - env(safe-area-inset-top, 0px));
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        animation: sheetUp 0.3s ease;
    }
    .modal-header {
        padding: 0.85rem 1rem;
        padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
    }
    .modal-body {
        padding: 0.85rem 1rem;
        flex: 1 1 auto;
        overscroll-behavior: contain;
    }
    .modal-footer {
        flex-direction: column;
        padding: 0.75rem 1rem;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
        background: var(--bg-card);
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
    }
    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }
    .prize-places-grid {
        grid-template-columns: 1fr;
    }
    .modal-create .form-group {
        margin-bottom: 0.75rem;
    }
    .modal-create .form-textarea {
        min-height: 64px;
    }
    .modal-create .form-input,
    .modal-create .form-textarea {
        font-size: 16px;
    }
    .modal-create input[type="datetime-local"] {
        max-width: 100%;
        box-sizing: border-box;
    }
    .admin-table { display: block; overflow-x: auto; }
    .comment-form { flex-direction: column; }
    .countdown-timer { font-size: 1.5rem; }
    .notif-panel,
    .site-chat-panel {
        left: 12px;
        right: 12px;
        width: auto;
        max-height: min(55dvh, calc(100dvh - 88px));
    }
    .site-chat-panel {
        height: min(420px, calc(100dvh - 88px));
    }
    .notif-panel-close {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .notif-toast-stack {
        top: auto;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        left: 12px;
        right: 12px;
        max-width: none;
    }
    .notif-toast {
        transform: translateY(12px);
        width: 100%;
    }
    .notif-toast.is-visible {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .user-avatar { width: 32px; height: 32px; }
    .btn { min-height: 44px; }
    .btn-sm { min-height: 38px; }
    .giveaway-image { height: 140px; }
}

/* ========== АВТОРИЗАЦИЯ ========== */
.auth-body { overflow: hidden; }

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
}

.login-card {
    width: 100%;
    max-width: 360px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
    border-radius: 14px;
}

.login-brand {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-brand span {
    -webkit-text-fill-color: var(--text);
    color: var(--text);
}

.login-tagline {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    margin-bottom: 1.25rem;
}

.login-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.auth-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 1rem;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.auth-error {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    font-size: 0.85rem;
}

.auth-back { margin-top: 1rem; }

.balance-hint {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.lolz-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    padding: 0.45rem 0.9rem;
    border: 2px solid var(--primary);
    border-radius: 999px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.lolz-profile-link:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
}

/* ========== УВЕДОМЛЕНИЯ ========== */
.user-notifications {
    position: relative;
    flex-shrink: 0;
}

.notif-bell {
    /* extends .nav-tool-btn */
}

.notif-bell-badge {
    /* extends .nav-tool-badge */
}

.notif-panel {
    position: fixed;
    top: calc(64px + env(safe-area-inset-top, 0px));
    right: 12px;
    width: min(360px, calc(100vw - 24px));
    max-height: min(420px, calc(100vh - 80px));
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    z-index: 1200;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.notif-panel.is-open {
    display: flex;
    animation: panelDrop 0.22s ease both;
}

@keyframes panelDrop {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
}

.notif-panel-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notif-panel-close {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.15rem;
}

.notif-panel-close:hover {
    color: var(--text);
}

.notif-mark-all {
    border: none;
    background: none;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.notif-list {
    overflow-y: auto;
    max-height: 340px;
}

.notif-item {
    display: flex;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.notif-item:hover {
    background: var(--bg-card-hover);
}

.notif-item.is-unread {
    background: rgba(16, 185, 129, 0.06);
}

.notif-item-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notif-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.notif-item-title {
    font-weight: 700;
    font-size: 0.875rem;
}

.notif-item-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.notif-item-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.notif-item-amount {
    color: var(--success);
    font-weight: 700;
}

.notif-empty,
.notif-loading {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.notif-toast-stack {
    position: fixed;
    top: 80px;
    right: 16px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    pointer-events: none;
    max-width: min(360px, calc(100vw - 2rem));
}

.notif-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: auto;
}

.notif-toast.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.notif-toast-win { border-left: 3px solid #fbbf24; }
.notif-toast-withdraw { border-left: 3px solid #34d399; }
.notif-toast-withdraw_failed { border-left: 3px solid #f87171; }
.notif-toast-balance { border-left: 3px solid #60a5fa; }

.notif-toast-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
}

.notif-toast-body strong {
    font-size: 0.875rem;
}

.notif-toast-close {
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
}

/* ========== АНИМАЦИИ ========== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes sheetUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeUp 0.4s ease both; }
.pulse { animation: pulse 2s ease-in-out infinite; }

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35); }
    50% { transform: scale(1.04); box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5); }
}

.giveaway-card,
.profile-header,
.balance-card,
.sidebar-card,
.admin-stat-card {
    animation: fadeUp 0.4s ease both;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== СКРОЛЛБАР ========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ========== РОЛИ И ПРЕФИКСЫ ========== */
.user-prefix {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    vertical-align: middle;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.user-prefix.prefix-role-owner {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fbbf24;
}

.user-prefix.prefix-role-admin {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.user-prefix.prefix-role-editor {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.user-prefix.prefix-role-moderator {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #c084fc;
}

.user-prefix.prefix-role-user {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.profile-prefix-between {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.profile-prefix-between .user-prefix {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
}

.profile-header .lolz-profile-link {
    margin-top: 0.45rem;
    flex-shrink: 0;
    align-self: flex-start;
}

.role-settings-block {
    padding: 0.85rem 0;
    border-top: 1px solid var(--border);
}

.role-settings-block:first-of-type {
    border-top: none;
    padding-top: 0;
}

.role-settings-key {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.role-settings-code {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
}

.role-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.role-owner { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.role-admin { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.role-editor { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.role-moderator { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.role-user { background: var(--bg-input); color: var(--text-muted); }

.profile-view-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.balance-hint-warn {
    color: #f59e0b !important;
}

.admin-help-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.admin-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
}

.admin-settings-form .form-group {
    margin-bottom: 1rem;
}

.admin-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.form-input-sm {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    min-width: 90px;
}

.profile-staff-comments {
    margin-top: 1rem;
}

/* ——— Стена профиля (стиль lolz.live) ——— */
.profile-wall {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.profile-wall-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.profile-wall-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.profile-wall-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.wall-composer {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.wall-composer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.wall-composer-main {
    flex: 1;
    min-width: 0;
}

.wall-composer-box {
    position: relative;
    background: #1a1f2e;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: visible;
}

.wall-composer-input {
    width: 100%;
    min-height: 72px;
    padding: 0.85rem 3rem 0.85rem 0.85rem;
    border: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.45;
    resize: vertical;
}

.wall-composer-input:focus {
    outline: none;
}

.wall-composer-input::placeholder {
    color: var(--text-muted);
}

.wall-composer-tools {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    display: flex;
    gap: 0.25rem;
}

.wall-tool-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.wall-tool-btn:hover,
.wall-tool-btn.is-active {
    background: rgba(16, 185, 129, 0.12);
    color: var(--primary);
}

.wall-smilie-popover {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 40;
    width: min(340px, calc(100vw - 2rem));
    background: #121826;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
}

.wall-smilie-popover[hidden] {
    display: none !important;
}

.wall-smilie-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.wall-smilie-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.wall-smilie-close:hover {
    background: var(--bg-input);
    color: var(--text);
}

.wall-smilie-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.25rem;
    padding: 0.65rem;
    max-height: 220px;
    overflow-y: auto;
}

.wall-smilie-btn {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0.15rem;
    transition: background 0.12s, border-color 0.12s;
}

.wall-smilie-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(16, 185, 129, 0.35);
}

.wall-smilie-btn .lolz-smilie,
.wall-smilie-btn .lolz-smilie-sprite {
    width: 22px !important;
    height: 22px !important;
}

.wall-smilie-btn-emoji {
    font-size: 1.15rem;
}

.wall-smilie-tabs {
    display: flex;
    gap: 0.15rem;
    padding: 0.45rem 0.55rem;
    border-top: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: thin;
}

.wall-smilie-tab {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0.2rem;
    opacity: 0.65;
    transition: opacity 0.12s, background 0.12s, border-color 0.12s;
}

.wall-smilie-tab:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.05);
}

.wall-smilie-tab.is-active {
    opacity: 1;
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.1);
}

.wall-smilie-tab .lolz-smilie,
.wall-smilie-tab .lolz-smilie-sprite {
    width: 20px !important;
    height: 20px !important;
}

.wall-publish-btn {
    margin-top: 0.65rem;
    min-width: 140px;
    font-weight: 600;
}

.wall-login-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0 0 1rem;
}

.wall-feed {
    display: flex;
    flex-direction: column;
}

.wall-post {
    display: flex;
    gap: 0.85rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.wall-post:first-child {
    border-top: 1px solid var(--border);
}

.wall-post-avatar-link {
    flex-shrink: 0;
}

.wall-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.wall-post-body {
    flex: 1;
    min-width: 0;
}

.wall-post-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.wall-post-author {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.wall-post-author:hover .user-name {
    color: var(--primary);
}

.wall-post-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.wall-post-text {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
    word-break: break-word;
}

.wall-post-text .lolz-smilie,
.wall-post-text .lolz-smilie-sprite {
    width: 22px;
    height: 22px;
}

.wall-empty {
    color: var(--text-muted);
    text-align: center;
    margin: 1.5rem 0;
}

@media (max-width: 640px) {
    .wall-smilie-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .wall-smilie-popover {
        right: auto;
        left: 0;
        width: 100%;
    }
}

.profile-wall-card {
    margin-top: 1rem;
}

.profile-comment-compose {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-smilie-picker {
    position: relative;
}

.profile-smilie-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 20;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.65rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    max-height: 240px;
    overflow: auto;
}

.profile-smilie-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.profile-smilie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 0.35rem;
}

.profile-smilie-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-input);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.profile-smilie-btn:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.profile-smilie-btn-emoji {
    font-size: 1.15rem;
}

.profile-comment-login-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0 0 1rem;
}

.profile-comment-author {
    color: inherit;
    text-decoration: none;
}

.profile-comment-author:hover .user-name {
    color: var(--primary);
}

.lolz-smilie {
    display: inline-block;
    vertical-align: middle;
    width: 22px;
    height: 22px;
    margin: 0 1px;
}

.lolz-smilie-sprite {
    object-fit: none;
}

.profile-comment-text .lolz-smilie,
.profile-comment-text .lolz-smilie-sprite {
    width: 22px;
    height: 22px;
}

.profile-comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.profile-comment-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-comment-item {
    display: flex;
    gap: 0.65rem;
    padding: 0.75rem;
    background: var(--bg-input);
    border-radius: 10px;
}

.profile-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.profile-comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.profile-comment-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.profile-comment-text {
    color: var(--text-secondary);
    line-height: 1.45;
    font-size: 0.9rem;
}

.profile-comment-empty {
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}

.online-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6b7280;
    flex-shrink: 0;
}

.online-dot.is-online {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.online-online {
    color: #22c55e;
}

.staff-online-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.staff-online-group {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 0.75rem;
}

.staff-online-role {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.staff-online-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0;
    border-top: 1px solid var(--border);
}

.staff-online-row:first-of-type {
    border-top: none;
}

.staff-online-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.staff-online-info {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
}

/* ========== ЧАТ (кнопка в шапке) ========== */
.site-chat-wrap {
    position: relative;
}

.site-chat-panel {
    position: fixed;
    top: calc(64px + env(safe-area-inset-top, 0px));
    right: 12px;
    width: min(360px, calc(100vw - 24px));
    height: min(420px, calc(100dvh - 90px));
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1150;
}

.site-chat-panel.is-open {
    display: flex;
    animation: panelDrop 0.22s ease both;
}

.site-chat-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-input);
}

.site-chat-close {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: -0.5rem -0.35rem -0.5rem 0;
}

.site-chat-close:hover {
    color: var(--text);
}

.site-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.site-chat-message {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
}

.site-chat-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.site-chat-bubble {
    background: var(--bg-input);
    border-radius: 10px;
    padding: 0.45rem 0.6rem;
    max-width: calc(100% - 36px);
}

.site-chat-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.15rem;
    flex-wrap: wrap;
}

.site-chat-author {
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text);
    text-decoration: none;
}

.site-chat-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.site-chat-text {
    font-size: 0.85rem;
    line-height: 1.4;
    word-break: break-word;
}

.user-name-glow {
    font-weight: 600;
}

.profile-title-name {
    font-size: inherit;
}

.site-chat-avatar-link {
    flex-shrink: 0;
    line-height: 0;
}

.site-chat-avatar-link:hover .site-chat-avatar {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.45);
}

.site-chat-author:hover .user-name {
    text-decoration: underline;
}

.site-chat-text .lolz-smilie,
.site-chat-text .lolz-smilie-sprite {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.site-chat-compose-box {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    background: #1a1f2e;
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 0;
}

.site-chat-compose-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.55rem 2.5rem 0.55rem 0.65rem;
    min-width: 0;
}

.site-chat-compose-box input:focus {
    outline: none;
}

.site-chat-compose-tools {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
}

.site-chat-smilie-popover {
    bottom: calc(100% + 0.45rem);
    top: auto;
    right: 0;
    left: auto;
}

.site-chat-send {
    flex-shrink: 0;
    min-width: 42px;
}

.site-chat-form {
    display: flex;
    gap: 0.4rem;
    padding: 0.65rem;
    border-top: 1px solid var(--border);
    align-items: center;
}

/* ========== НАСТРОЙКА НИКА ========== */
.appearance-card {
    max-width: 520px;
}

.appearance-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0 0 1rem;
}

.appearance-preview {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    background: var(--bg-input);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.appearance-preview-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.appearance-hex-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.appearance-color-input {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.appearance-hex-text {
    flex: 1;
    font-family: ui-monospace, monospace;
}

.appearance-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.appearance-swatch {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: var(--swatch-color);
    cursor: pointer;
    box-shadow: 0 0 10px var(--swatch-color);
    transition: transform 0.12s, border-color 0.12s;
}

.appearance-swatch:hover {
    transform: scale(1.08);
}

.appearance-swatch.is-active {
    border-color: #fff;
}

.appearance-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.appearance-status {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
}

.appearance-status.is-success {
    color: var(--primary);
}

.appearance-status.is-error {
    color: var(--danger);
}

.site-chat-login-hint,
.site-chat-empty,
.site-chat-loading {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========== ПРОФИЛЬ — ВКЛАДКИ И TELEGRAM ========== */
.profile-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.profile-tab {
    padding: 0.55rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    transition: background 0.2s, color 0.2s;
}

.profile-tab:hover {
    color: var(--text);
    background: var(--bg-card-hover);
}

.profile-tab.is-active {
    color: var(--primary);
    background: var(--primary-light);
}

.telegram-verify-card {
    max-width: 560px;
}

.telegram-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.telegram-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: var(--bg-input);
    border-radius: 10px;
    font-size: 0.875rem;
}

.telegram-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.form-check-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.form-check-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.telegram-giveaway-block .alert {
    margin-bottom: 0.75rem;
}

.telegram-giveaway-block a {
    color: var(--primary);
}

/* ========== IP / БАНЫ ========== */
.ip-cell {
    font-size: 0.78rem;
    line-height: 1.35;
    min-width: 110px;
}

.ip-cell-sub {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.ip-search-link {
    color: var(--primary);
    font-size: 0.72rem;
    text-decoration: none;
}

.ip-search-link:hover {
    text-decoration: underline;
}

.profile-ip-card {
    max-width: 720px;
}

.profile-ip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.profile-ip-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.profile-ip-related-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    font-size: 0.85rem;
}

.profile-ip-related-row:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .profile-ip-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== DARK THEME OVERRIDES ========== */
:root {
    --primary: #2ecf88;
    --primary-hover: #39dd95;
    --primary-light: rgba(46, 207, 136, 0.12);
    --primary-glow: rgba(46, 207, 136, 0.28);
    --bg-dark: #05080f;
    --bg-card: #0d121b;
    --bg-card-hover: #121924;
    --bg-input: #111823;
    --border: #1a2432;
    --text: #e9f0ff;
    --text-secondary: #a9b8cf;
    --text-muted: #75839a;
    --gradient: linear-gradient(135deg, #1db978 0%, #3fd89d 65%, #79f0bf 100%);
}

body {
    background:
        radial-gradient(1200px 540px at 75% -8%, rgba(46, 207, 136, 0.12), transparent 56%),
        radial-gradient(900px 420px at 15% 0%, rgba(40, 107, 255, 0.08), transparent 58%),
        #05080f;
}

body::before {
    background:
        linear-gradient(to bottom, rgba(15, 22, 33, 0.58), rgba(5, 8, 15, 0)),
        radial-gradient(ellipse at 82% 22%, rgba(46, 207, 136, 0.1) 0%, transparent 52%);
}

.navbar {
    background: rgba(9, 14, 22, 0.9);
    border-bottom: 1px solid #1a2432;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.logo-icon {
    border: 1px solid rgba(46, 207, 136, 0.28);
    box-shadow: 0 0 0 4px rgba(46, 207, 136, 0.08), 0 4px 18px rgba(46, 207, 136, 0.35);
}

.nav-menu a {
    color: #98a9c3;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #e9f0ff;
    background: #111a27;
}

.container {
    max-width: 1360px;
}

.mrkt-hero {
    position: relative;
    border: 1px solid #192433;
    background: linear-gradient(145deg, #0d121b 0%, #090d15 100%);
    border-radius: 18px;
    padding: 1.75rem;
    margin-bottom: 1.4rem;
    overflow: hidden;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.42);
}

.mrkt-hero-content {
    max-width: 680px;
    position: relative;
    z-index: 1;
}

.mrkt-hero-pill {
    display: inline-flex;
    border: 1px solid #223245;
    border-radius: 999px;
    padding: 0.22rem 0.7rem;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    color: #8ea3be;
}

.mrkt-hero-title {
    margin-top: 0.75rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.03em;
    line-height: 1;
}

.mrkt-hero-title span {
    color: #4ae5a4;
    text-shadow: 0 0 28px rgba(74, 229, 164, 0.35);
}

.mrkt-hero-text {
    margin-top: 0.8rem;
    color: var(--text-secondary);
    max-width: 620px;
}

.mrkt-hero-tags {
    margin-top: 1rem;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.mrkt-hero-tags span {
    border: 1px solid #1e2b3b;
    background: #0f1826;
    color: #9eb0c9;
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
}

.mrkt-hero-glow {
    position: absolute;
    right: -90px;
    bottom: -100px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(67, 235, 164, 0.25) 0%, rgba(67, 235, 164, 0) 68%);
}

.sidebar-card,
.giveaway-card,
.modal,
.telegram-verify-card,
.appearance-card,
.site-chat-panel {
    border: 1px solid #1a2432;
    background: linear-gradient(180deg, #0d131c 0%, #0b1018 100%);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

.giveaway-card:hover {
    border-color: #223247;
    transform: translateY(-2px);
}

.giveaway-image {
    background: radial-gradient(circle at 50% 30%, rgba(61, 224, 154, 0.12), rgba(0, 0, 0, 0));
}

.btn {
    border-radius: 10px;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(180deg, #37d992 0%, #25bc79 100%);
    border-color: #26b876;
    color: #03130b;
}

.btn-primary:hover {
    filter: brightness(1.05);
    box-shadow: 0 8px 20px rgba(46, 207, 136, 0.3);
}

.btn-secondary {
    background: #131b27;
    border-color: #233145;
    color: #d6e0f0;
}

.profile-tabs {
    border-bottom-color: #1a2432;
}

.profile-tab.is-active {
    background: #111b29;
    border: 1px solid #244060;
    color: #dff1ff;
}

.site-chat-bubble,
.wall-composer-box,
.appearance-preview,
.form-input,
.form-textarea {
    background: #101824;
    border-color: #202d3f;
}

.wall-post,
.site-chat-message {
    border-color: #192433;
}

.status-badge {
    border: 1px solid transparent;
}

.status-active {
    background: rgba(46, 207, 136, 0.12);
    border-color: rgba(46, 207, 136, 0.32);
}

@media (max-width: 840px) {
    .mrkt-hero {
        padding: 1.15rem;
    }
    .mrkt-hero-glow {
        width: 280px;
        height: 280px;
        right: -70px;
        bottom: -70px;
    }
}
