/* ==================== VARIABLES ==================== */
:root {
    --primary-color: #ffffff;
    --primary-hover: #e0e0e0;
    --bg-dark: #000000;
    --bg-card: #0a0a0a;
    --bg-card-hover: #151515;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --border-color: #1a1a1a;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    --shadow-hover: 0 15px 60px rgba(255, 255, 255, 0.1);
}

/* ==================== RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==================== UTILITIES ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--text-primary), transparent);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
}

.btn-secondary:hover {
    background: var(--text-primary);
    color: var(--bg-dark);
    transform: translateY(-2px);
}

.btn-large {
    padding: 18px 48px;
    font-size: 1.1rem;
}

.btn-invite {
    background: var(--text-primary);
    color: var(--bg-dark);
    padding: 10px 24px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-invite:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

/* ==================== NAVIGATION ==================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 15px 0;
    transition: box-shadow 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:not(.btn-invite):hover {
    color: var(--text-primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ==================== HERO SECTION ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.grid-overlay {
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-logo {
    width: 150px;
    height: 150px;
    margin-bottom: 30px;
    object-fit: contain;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 60px;
}

.stats-preview {
    display: flex;
    gap: 60px;
    justify-content: center;
    margin-top: 80px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Loading Dot Animation */
.loading-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-primary);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ==================== FEATURES SECTION ==================== */
.features {
    padding: 120px 0;
    background: var(--bg-dark);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--text-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--text-primary);
    background: var(--bg-card-hover);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon-img {
    filter: brightness(1.2);
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ==================== COMMANDS SECTION ==================== */
.commands {
    padding: 120px 0;
    background: var(--bg-dark);
    position: relative;
}

.commands::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.command-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-30px);
}

.command-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.command-card:hover {
    border-color: var(--text-primary);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.1);
}

.command-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.command-header code {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.command-badge {
    background: var(--text-primary);
    color: var(--bg-dark);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.command-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== STATS SECTION ==================== */
.stats-section {
    padding: 120px 0;
    background: var(--bg-dark);
    position: relative;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.stat-card {
    text-align: center;
    padding: 50px 30px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.9);
}

.stat-card.visible {
    opacity: 1;
    transform: scale(1);
}

.stat-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
    border-color: var(--text-primary);
}

.stat-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1);
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon-img {
    filter: brightness(1.2);
    transform: scale(1.1);
}

.stat-big-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
    margin-bottom: 10px;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ==================== CTA SECTION ==================== */
.cta {
    padding: 120px 0;
    text-align: center;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.cta .container {
    position: relative;
    z-index: 1;
}

.cta-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    object-fit: contain;
}

.cta h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.cta p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: var(--text-primary);
    padding-left: 5px;
}

.footer-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    object-fit: contain;
}

.footer-text {
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* ==================== ERROR STATES ==================== */
.error-text {
    color: #ff4444;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.has-error {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Error Notification */
.error-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(255, 68, 68, 0.95);
    border: 1px solid #ff0000;
    border-radius: 8px;
    padding: 20px;
    max-width: 400px;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
}

@keyframes slideInRight {
    from {
        transform: translateX(500px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.error-notification-content {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    color: white;
}

.error-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.error-message strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.error-message p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.error-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.error-close:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .error-notification {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}