/* ===========================
   Havor.ru - Styles
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --bg-dark: #ffffff;
    --bg-card: #f8f9fa;
    --bg-card-hover: #e9ecef;
    --text-primary: #1a1a2e;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --border: #dee2e6;
    --success: #10b981;
    --error: #ef4444;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
}

[data-theme="dark"] {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --bg-dark: #0f0f23;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252542;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b80;
    --border: #2a2a40;
    --success: #10b981;
    --error: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
}

.logo-icon {
    font-size: 28px;
}

.logo-dot {
    color: var(--primary);
}

.nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-credits {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: 20px;
    font-weight: 500;
}

.credits-icon {
    font-size: 16px;
}

.user-email {
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 0 60px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-light);
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* Section Titles */
.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
}

/* Services Section */
.services {
    padding: 80px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.service-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-4px);
}

.service-card.coming-soon {
    opacity: 0.6;
}

.service-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.service-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.service-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.service-credits {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Pricing Section */
.pricing {
    padding: 80px 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px 30px;
    border: 1px solid var(--border);
    text-align: center;
    position: relative;
}

.pricing-card.popular {
    border-color: var(--primary);
    transform: scale(1.05);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pricing-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.pricing-price {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 5px;
}

.pricing-credits {
    color: var(--primary-light);
    font-size: 16px;
    margin-bottom: 30px;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 30px;
}

.pricing-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.pricing-features li::before {
    content: '✓';
    color: var(--success);
    margin-right: 10px;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 40px;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.footer-text {
    color: var(--text-muted);
    font-size: 14px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    max-width: 420px;
    width: 90%;
    border: 1px solid var(--border);
    animation: modalIn 0.3s ease;
}

.modal-large {
    max-width: 600px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-error {
    color: var(--error);
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    min-height: 20px;
}

.modal-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.modal-switch a {
    color: var(--primary-light);
    text-decoration: none;
}

.modal-switch a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.dashboard-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.dashboard-value {
    font-size: 18px;
    font-weight: 600;
}

.dashboard-section-title {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.token-box {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 10px;
}

.token-box code {
    flex: 1;
    font-size: 12px;
    color: var(--text-secondary);
    word-break: break-all;
    font-family: monospace;
}

.token-hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }

    .pricing-card.popular {
        transform: none;
    }

    .header {
        flex-direction: column;
        gap: 15px;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}
