@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

/* NightVisuals Style Engine 2026
   Premium Rockstar/Apple Aesthetic
*/

:root {
    --bg: #000000;
    --header-bg: rgba(0, 0, 0, 0.7);
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.5);
    --accent: #8a2be2;
    --accent-glow: rgba(138, 43, 226, 0.3);
    --hwid-color: #00eaff;
    --glass: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.05);
    --expo: cubic-bezier(0.19, 1, 0.22, 1);
}

/* 1. Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    outline: none;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Блокировка скролла при открытой модалке */
body.modal-open {
    overflow: hidden !important;
    height: 100vh;
}

/* 2. Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* 3. Background Fix & Glow */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    display: block;
    background: #000;
}

#mouse-glow {
    position: fixed; top: 0; left: 0; width: 60vw; height: 60vw;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%; z-index: -1; pointer-events: none;
    transform: translate(-50%, -50%); will-change: transform;
    transition: transform 1.2s var(--expo);
}

/* 4. Header & Navigation */
header { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 20px 8%; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border); position: sticky; top: 0; z-index: 1000; 
    background: var(--header-bg); 
}

.logo { font-size: 1.4rem; font-weight: 900; cursor: pointer; letter-spacing: -1px; }
.accent { color: var(--accent); }

/* 5. Sections & Layout */
.section {
    display: none;
    padding: 80px 8%;
    opacity: 0;
    transform: translateY(60px);
    filter: saturate(0) blur(10px);
    transition: opacity 1.2s var(--expo), transform 1.2s var(--expo), filter 1.2s var(--expo);
}

.section.active {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
    filter: saturate(1) blur(0);
}

.price-grid {
    display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; align-items: stretch;
    max-width: 1300px; margin: 50px auto;
}

/* 6. Cards Architecture */
.glass-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.6s var(--expo);
}

.price-card {
    width: 320px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.price-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.04);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--expo);
    z-index: 2;
}

.glass-card:hover::before { transform: scaleX(1); }

.glint {
    position: absolute;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

/* 7. Typography & Utils */
.price { font-size: 3.5rem; font-weight: 900; margin: 20px 0; letter-spacing: -2px; }
.hwid-badge {
    font-size: 10px; color: var(--hwid-color); letter-spacing: 2px;
    text-transform: uppercase; margin-bottom: 10px; display: block;
}

/* 8. Buttons - Unified Fill Effect */
.btn {
    padding: 16px 30px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    transition: all 0.4s var(--expo);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Общая подложка (шторка) для всех кнопок */
.btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    z-index: -1;
    transition: height 0.5s var(--expo);
}

.btn:hover::after {
    height: 100%;
}

/* --- Фиолетовая кнопка (Primary) --- */
.btn-primary {
    border: 1px solid var(--accent);
    background: transparent; /* Изначально прозрачная, чтобы шторка была видна */
    color: #fff;
}

.btn-primary::after {
    background: var(--accent);
}

.btn-primary:hover {
    box-shadow: 0 10px 30px var(--accent-glow);
}

/* --- Контурная кнопка (Outline) --- */
.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text);
}

/* Для аутлайна делаем белую шторку */
.btn-outline::after {
    background: #ffffff;
}

/* Инверсия цвета текста при наведении, чтобы его было видно на белом фоне */
.btn-outline:hover {
    color: #000;
    border-color: #fff;
}

/* 9. Modal (FULL LOCK & BLUR) */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: none; justify-content: center; align-items: center;
    z-index: 9999; opacity: 0; transition: opacity 0.5s var(--expo);
}

.modal-overlay.active { display: flex !important; opacity: 1; }

.modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 40px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transform: translateY(40px) scale(0.95);
    transition: all 0.8s var(--expo);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 30px var(--accent-glow);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; 
    width: 100%; height: 3px;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-content h3 { font-size: 1.8rem; font-weight: 800; margin-bottom: 12px; letter-spacing: -1px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.modal-content p { font-size: 1.05rem; color: var(--text-dim); line-height: 1.6; margin-bottom: 30px; }
.modal-buttons { display: flex; gap: 15px; margin-top: 30px; }
.modal-buttons .btn { flex: 1; }

/* 10. Inputs */
input {
    width: 100%;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: #fff;
    margin-bottom: 15px;
    transition: 0.3s var(--expo);
}

input:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.1);
}

/* 11. Auth Tabs */
.auth-tabs-container {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 10px;
}

.auth-tab {
    opacity: 0.4;
    cursor: pointer;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    transition: opacity 0.4s var(--expo);
    position: relative;
    z-index: 2;
}

.auth-tab.active { opacity: 1; }

.auth-nav-line {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
    transition: all 0.6s var(--expo);
    border-radius: 2px;
    will-change: left, width; /* Подсказка браузеру для плавной отрисовки */
    left: 0;
    width: 0;
}

/* 12. Settings / Background Mode Selector */
.settings-group {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.settings-card .mode-selector,
.mode-selector {
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 4px;
    width: 100%;
}

.settings-card .mode-btn,
.mode-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    z-index: 2;
    opacity: 0.3;
    transition: 0.3s var(--expo);
}

.settings-card .mode-btn.active,
.mode-btn.active { opacity: 1; }

.settings-card .mode-line,
.mode-line {
    position: absolute;
    height: calc(100% - 8px);
    background: var(--accent);
    border-radius: 8px;
    transition: all 0.5s var(--expo);
    z-index: 1;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* 13. Tickets / Support Elements */
.ticket-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px !important;
    margin-bottom: 15px;
    cursor: pointer;
    border-color: rgba(255,255,255,0.05);
}

.ticket-item:hover { border-color: var(--accent); }

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(255,255,255,0.1);
}

.status-badge.active { background: #00ff88; color: #000; }

.message {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: 18px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    position: relative;
}

.message.user { align-self: flex-end; background: var(--accent); margin-left: auto; }
.message.admin { align-self: flex-start; background: rgba(255,255,255,0.05); }

/* Admin Keys Styling */
.admin-key-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(138, 43, 226, 0.08);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.admin-key-item:hover {
    background: rgba(138, 43, 226, 0.15);
    border-color: rgba(138, 43, 226, 0.4);
    transform: translateX(4px);
}

.admin-key-code {
    color: var(--accent);
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    margin-bottom: 8px;
}

.admin-key-info {
    font-size: 0.75rem;
    opacity: 0.6;
    display: flex;
    gap: 15px;
}

.admin-key-status {
    font-weight: 600;
}

.admin-key-actions {
    display: flex;
    gap: 8px;
}

.admin-key-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-key-btn:hover {
    background: rgba(138, 43, 226, 0.3);
    border-color: var(--accent);
}

/* Admin Panel Users Table */
.admin-user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    margin-bottom: 12px;
    background: rgba(0, 234, 255, 0.05);
    border: 1px solid rgba(0, 234, 255, 0.15);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.admin-user-item:hover {
    background: rgba(0, 234, 255, 0.12);
    border-color: rgba(0, 234, 255, 0.3);
    transform: translateX(4px);
}

.admin-user-info {
    flex: 1;
}

.admin-user-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--text);
}

.admin-user-details {
    display: flex;
    gap: 20px;
    font-size: 0.75rem;
    opacity: 0.7;
}

.admin-user-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    border: 1px solid rgba(138, 43, 226, 0.3);
    background: rgba(138, 43, 226, 0.1);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.admin-btn:hover {
    background: rgba(138, 43, 226, 0.3);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.admin-btn.danger {
    border-color: rgba(255, 68, 68, 0.3);
    background: rgba(255, 68, 68, 0.1);
}

.admin-btn.danger:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: #ff4444;
}

/* Admin Tickets */
.admin-ticket-item {
    padding: 14px;
    margin-bottom: 12px;
    background: rgba(255, 204, 0, 0.05);
    border: 1px solid rgba(255, 204, 0, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-ticket-item:hover {
    background: rgba(255, 204, 0, 0.12);
    border-color: rgba(255, 204, 0, 0.4);
    transform: translateX(4px);
}

/* Key Activation Form */
#key-activation-area {
    margin-top: 30px;
    padding: 20px;
    background: rgba(138, 43, 226, 0.08);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 12px;
    text-align: center;
}

#key-input {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    background: rgba(138, 43, 226, 0.1);
    border: 2px solid rgba(138, 43, 226, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    text-align: center;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    transition: all 0.3s;
    margin-bottom: 12px;
}

#key-input:focus {
    border-color: var(--accent);
    background: rgba(138, 43, 226, 0.15);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
}

#key-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.key-activate-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--accent), #ff00ff);
    border: none;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.key-activate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.4);
}

.key-activate-btn:active {
    transform: translateY(0);
}

/* Select Styles for Gen Key */
select {
    padding: 10px 12px;
    background: rgba(138, 43, 226, 0.1);
    border: 2px solid rgba(138, 43, 226, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

select:hover {
    border-color: rgba(138, 43, 226, 0.5);
    background: rgba(138, 43, 226, 0.15);
}

select:focus {
    border-color: var(--accent);
    background: rgba(138, 43, 226, 0.2);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
    outline: none;
}

select option {
    background: #000;
    color: #fff;
    padding: 10px;
}

input[type="text"] {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

input[type="text"]:focus {
    border-color: var(--accent);
    background: rgba(138, 43, 226, 0.1);
    outline: none;
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Confirmation Modal */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.confirm-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.confirm-modal {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(138, 43, 226, 0.1) 100%);
    border: 2px solid rgba(138, 43, 226, 0.3);
    border-radius: 12px;
    padding: 40px;
    max-width: 420px;
    width: 90%;
    backdrop-filter: blur(20px);
    text-align: center;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.confirm-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--accent);
    letter-spacing: -0.5px;
}

.confirm-text {
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 30px;
    line-height: 1.6;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Confirmation Modal */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.confirm-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.confirm-modal {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(138, 43, 226, 0.1) 100%);
    border: 2px solid rgba(138, 43, 226, 0.3);
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    backdrop-filter: blur(20px);
    text-align: center;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.confirm-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--accent);
}

.confirm-text {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 24px;
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}