/* ========================================
   MAIN.CSS - Единый файл стилей для всех страниц
   ======================================== */

/* ---------- RESET & BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --primary-light: #8296f0;
    --secondary-color: #48bb78;
    --danger-color: #f56565;
    --dark-bg: #0f0f1a;
    --footer-bg: #0a0a12;
    --gradient-start: #1a1a2e;
    --gradient-end: #16213e;
    --border-light: rgba(255,255,255,0.08);
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- HEADER & NAVIGATION ---------- */
.main-header, .landing-header {
    background: var(--dark-bg);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content, .landing-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.logo h1 {
    font-size: 20px;
    margin: 0;
}

.logo a, .landing-header .logo h1 {
    color: var(--primary-color);
    text-decoration: none;
}

.logo a:hover {
    color: var(--primary-light);
}

/* ---------- USER MENU & DROPDOWN ---------- */
.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    transition: background 0.2s;
    position: relative;
}

.user-info::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 10px;
    pointer-events: auto;
}

.user-info:hover {
    background: rgba(255,255,255,0.1);
}

.user-name {
    font-weight: 500;
    color: white;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--dark-bg);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    min-width: 180px;
    display: none;
    z-index: 10;
    margin-top: 0;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.user-info:hover .user-dropdown,
.user-dropdown:hover {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

/* ---------- HORIZONTAL MENU (Landing) ---------- */
.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.horizontal-menu {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.horizontal-menu li {
    margin: 0;
}

.horizontal-menu a {
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    padding: 5px 0;
    white-space: nowrap;
}

.horizontal-menu a:hover {
    color: var(--primary-color);
}

/* ---------- BUTTONS ---------- */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.3);
}

.btn-secondary {
    background: rgba(72,187,120,0.8);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72,187,120,0.3);
}

.btn-danger {
    background: rgba(229,62,62,0.8);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: var(--danger-color);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.btn-login {
    padding: 8px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    background: transparent;
}

.btn-login:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.3);
}

/* ---------- CARDS ---------- */
.card {
    background: var(--dark-bg);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
    font-size: 18px;
    color: white;
    margin: 0;
}

/* ---------- DASHBOARD & GRID ---------- */
.dashboard {
    flex: 1;
    padding: 40px 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.balance-card {
    text-align: center;
}

.balance-amount {
    font-size: 48px;
    font-weight: bold;
    color: var(--secondary-color);
    margin: 20px 0;
}

/* ---------- SERVICES ---------- */
.services-list {
    max-height: 400px;
    overflow-y: auto;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.service-info {
    flex: 1;
}

.service-info h4 {
    margin-bottom: 4px;
    font-size: 15px;
    color: white;
}

.service-info p {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
}

.service-price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 14px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
}

.service-card {
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s;
}

.service-card:hover {
    background: rgba(255,255,255,0.06);
}

.service-card h4 {
    margin-bottom: 8px;
    font-size: 15px;
    color: white;
}

.service-card p {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.ip-address {
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
    color: var(--secondary-color);
    margin-top: 8px;
}

/* ---------- NOTIFICATIONS ---------- */
.notifications {
    position: relative;
}

.notif-btn {
    background: rgba(255,255,255,0.05);
    border: none;
    font-size: 20px;
    cursor: pointer;
    position: relative;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.notif-btn:hover {
    background: rgba(255,255,255,0.1);
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: var(--dark-bg);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: none;
    z-index: 10;
    margin-top: 10px;
    border: 1px solid var(--border-light);
}

.notifications-dropdown.show {
    display: block;
}

.notif-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-light);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: white;
    font-size: 14px;
}

.notif-message {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 5px;
}

.notif-time {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
}

.notif-mark-read {
    margin-top: 8px;
    font-size: 11px;
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
}

.notif-empty {
    padding: 30px;
    text-align: center;
    color: rgba(255,255,255,0.5);
}

/* ---------- MODAL ---------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--dark-bg);
    border-radius: 24px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-light);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    margin: 0;
    color: white;
}

.close {
    font-size: 28px;
    cursor: pointer;
    color: rgba(255,255,255,0.5);
    transition: color 0.2s;
    line-height: 1;
}

.close:hover {
    color: white;
}

.modal-form, .payment-form {
    padding: 20px;
}

/* ---------- FORMS ---------- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    font-size: 14px;
    background: rgba(255,255,255,0.05);
    color: white;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
    background: rgba(255,255,255,0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.3);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,0.4);
    font-size: 11px;
}

.form-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: rgba(255,255,255,0.6);
}

.form-group.checkbox input {
    width: auto;
    margin: 0;
}

.payment-methods {
    margin: 20px 0;
}

.methods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.method-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.method-option:hover {
    border-color: var(--primary-color);
    background: rgba(255,255,255,0.05);
}

.method-option input {
    width: auto;
    margin: 0;
}

/* ---------- ALERTS ---------- */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: rgba(72,187,120,0.15);
    color: #9ae6b4;
    border-left: 3px solid var(--secondary-color);
}

.alert-error {
    background: rgba(229,62,62,0.15);
    color: #fc8181;
    border-left: 3px solid var(--danger-color);
}

/* ---------- AUTH PAGES (Login, Forgot Password) ---------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: var(--dark-bg);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 50px rgba(0,0,0,0.4);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
    color: white;
    letter-spacing: 1px;
}

.auth-header p {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    letter-spacing: 2px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.auth-footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--primary-color);
}

.separator {
    margin: 0 10px;
    color: rgba(255,255,255,0.3);
}

/* ---------- INFO BLOCK (Forgot Password) ---------- */
.info-block {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.info-block p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.info-block .phone {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 10px;
    display: inline-block;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: rgba(255,255,255,0.3);
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.divider::before {
    margin-right: 10px;
}

.divider::after {
    margin-left: 10px;
}

/* ---------- PROFILE PAGE ---------- */
.profile-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.profile-sidebar {
    background: var(--dark-bg);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: fit-content;
}

.profile-sidebar:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.profile-avatar {
    margin-bottom: 20px;
}

.avatar-placeholder {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    color: white;
    margin: 0 auto 15px;
}

.profile-info {
    text-align: left;
    margin-top: 20px;
}

.info-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.info-item label {
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    color: white;
    font-size: 15px;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.profile-form {
    margin-top: 10px;
}

/* ---------- LANDING HERO ---------- */
.landing-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.hero {
    flex: 1;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dor-net-block {
    background: var(--dark-bg);
    border-radius: 24px;
    padding: 80px 60px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dor-net-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 50px rgba(0,0,0,0.4);
}

.dor-net-block h2 {
    font-size: 72px;
    font-weight: 700;
    color: white;
    letter-spacing: 4px;
    margin: 0;
    text-shadow: 0 2px 10px rgba(102,126,234,0.3);
}

.dor-net-block .subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.6);
    margin-top: 20px;
    letter-spacing: 2px;
}

.dor-net-block .separator {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 25px auto;
}

/* ---------- FOOTER ---------- */
.footer {
    background: var(--footer-bg);
    padding: 40px 0 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 16px;
    color: white;
}

.footer-section p {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.4);
    font-size: 12px;
}

/* ---------- EMPTY STATE ---------- */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.5);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .header-content, .landing-header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .methods-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-container {
        grid-template-columns: 1fr;
    }
    
    .profile-sidebar {
        order: 2;
    }
    
    .profile-content {
        order: 1;
    }
    
    .dor-net-block {
        padding: 50px 30px;
    }
    
    .dor-net-block h2 {
        font-size: 42px;
        letter-spacing: 2px;
    }
    
    .dor-net-block .subtitle {
        font-size: 14px;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .info-block .phone {
        font-size: 18px;
    }
}