:root {
    --primary: #FFD700;
    --primary-dark: #FFA500;
    --secondary: #302b63;
    --dark: #0f0c29;
    --darker: #24243e;
    --light: #ffffff;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --gold-grad: linear-gradient(135deg, #FFD700, #FFA500);
    --dark-grad: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
}

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

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--dark-grad);
    color: var(--light);
    overflow-x: hidden;
    line-height: 1.8;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
}

.diamond {
    width: 80px;
    height: 80px;
    background: var(--gold-grad);
    transform: rotate(45deg);
    margin: 0 auto 30px;
    animation: diamondSpin 2s infinite;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
}

@keyframes diamondSpin {
    0% { transform: rotate(45deg) scale(1); }
    50% { transform: rotate(225deg) scale(1.2); }
    100% { transform: rotate(405deg) scale(1); }
}

.loading-text {
    font-size: 28px;
    font-weight: 900;
    background: var(--gold-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 1.5s infinite;
}

/* Navbar */
.navbar {
    background: rgba(15, 12, 41, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
    transition: all 0.3s;
}

.navbar.scrolled {
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    padding: 10px 0;
}

.brand-icon {
    font-size: 35px;
    margin-left: 10px;
    animation: float 3s ease-in-out infinite;
}

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

.brand-text {
    font-size: 28px;
    font-weight: 900;
    background: var(--gold-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: var(--light) !important;
    margin: 0 10px;
    position: relative;
    transition: all 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-grad);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.btn-golden {
    background: var(--gold-grad);
    color: var(--dark);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    border: none;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-golden:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.5);
    color: var(--dark);
}

.btn-outline-golden {
    background: transparent;
    color: var(--primary);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    border: 2px solid var(--primary);
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-golden:hover {
    background: var(--primary);
    color: var(--dark);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 100px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.1), transparent 70%);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 10px 25px;
    border-radius: 50px;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 60px;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 30px;
}

.hero-title .gradient-text {
    background: var(--gold-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 50px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 900;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.hero-image {
    position: relative;
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(2deg); }
    75% { transform: translateY(20px) rotate(-2deg); }
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.shape {
    position: absolute;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 10%;
    animation: shapeFloat 8s infinite;
}

.shape-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 10%;
    animation: shapeFloat 6s infinite 2s;
}

.shape-3 {
    width: 120px;
    height: 120px;
    bottom: 20%;
    left: 20%;
    animation: shapeFloat 10s infinite 4s;
}

@keyframes shapeFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, -30px) rotate(180deg); }
}

/* Features Section */
.features {
    padding: 100px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 80px;
}

.section-title h2 {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 20px;
}

.section-title p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

.feature-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 40px 30px;
    backdrop-filter: blur(20px);
    transition: all 0.5s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-15px);
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.2);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gold-grad);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 25px;
    transform: rotate(0deg);
    transition: transform 0.3s;
}

.feature-card:hover .feature-icon {
    transform: rotate(15deg);
}

.feature-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

/* Articles Section */
.articles {
    padding: 100px 0;
    background: rgba(0, 0, 0, 0.2);
}

.article-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.article-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.article-image {
    height: 200px;
    background: var(--gold-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
}

.article-body {
    padding: 25px;
}

.article-category {
    display: inline-block;
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 15px;
}

.article-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.article-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.8;
}

/* CTA Section */
.cta {
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15), transparent 70%);
    pointer-events: none;
}

.cta h2 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 30px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--glass-border);
    padding: 50px 0 20px;
}

.footer h5 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 20px;
}

.footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    margin-bottom: 10px;
}

.footer a:hover {
    color: var(--primary);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 45px;
    height: 45px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--gold-grad);
    transform: translateY(-5px);
}

/* Glass Card */
.glass-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 40px;
    backdrop-filter: blur(20px);
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 40px;
}

.auth-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 50px;
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 500px;
}

.form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 20px;
    border-radius: 15px;
    color: white;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-label {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    font-weight: 500;
}

/* Chat Interface */
.chat-container {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: rgba(255, 215, 0, 0.1);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 30px;
}

.message {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.message.ai {
    flex-direction: row;
}

.message.user {
    flex-direction: row-reverse;
    text-align: left;
}

.message-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.message.ai .message-avatar {
    background: var(--gold-grad);
}

.message.user .message-avatar {
    background: rgba(255, 255, 255, 0.2);
}

.message-content {
    max-width: 70%;
    padding: 15px 20px;
    border-radius: 20px;
    line-height: 1.8;
}

.message.ai .message-content {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-top-right-radius: 5px;
}

.message.user .message-content {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top-left-radius: 5px;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 15px;
}

.chat-input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 20px;
    border-radius: 50px;
    color: white;
    font-family: 'Vazirmatn', sans-serif;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .section-title h2 {
        font-size: 30px;
    }
    
    .cta h2 {
        font-size: 32px;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
}