:root {
    --primary-color: #00d4ff;
    --secondary-color: #ff6b35;
    --bg-dark: #0a0e1a;
    --bg-darker: #050811;
    --bg-card: rgba(13, 19, 33, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #b4c5e4;
    --border-color: rgba(0, 212, 255, 0.3);
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
}

[data-theme="light"] {
    --bg-dark: #f5f7fa;
    --bg-darker: #e9ecef;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #2c3e50;
    --text-secondary: #5a6c7d;
    --border-color: rgba(0, 123, 255, 0.3);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated background stars */
.stars, .stars2, .stars3 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.stars {
    background: transparent url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100"%3E%3Ccircle cx="2" cy="2" r="1" fill="white" opacity="0.3"/%3E%3Ccircle cx="50" cy="50" r="1" fill="white" opacity="0.3"/%3E%3Ccircle cx="80" cy="30" r="1" fill="white" opacity="0.3"/%3E%3C/svg%3E') repeat;
    animation: animateStars 200s linear infinite;
}

.stars2 {
    background: transparent url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="150" height="150"%3E%3Ccircle cx="5" cy="5" r="0.5" fill="white" opacity="0.5"/%3E%3Ccircle cx="75" cy="75" r="0.5" fill="white" opacity="0.5"/%3E%3Ccircle cx="120" cy="40" r="0.5" fill="white" opacity="0.5"/%3E%3C/svg%3E') repeat;
    animation: animateStars 150s linear infinite;
}

.stars3 {
    background: transparent url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="200" height="200"%3E%3Ccircle cx="10" cy="10" r="1.5" fill="white" opacity="0.2"/%3E%3Ccircle cx="100" cy="100" r="1.5" fill="white" opacity="0.2"/%3E%3Ccircle cx="160" cy="60" r="1.5" fill="white" opacity="0.2"/%3E%3C/svg%3E') repeat;
    animation: animateStars 100s linear infinite;
}

@keyframes animateStars {
    from { transform: translateY(0px); }
    to { transform: translateY(-2000px); }
}

/* Header */
header {
    position: relative;
    z-index: 100;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.beta-badge {
    background: linear-gradient(135deg, #ff6b35, #ff9558);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

#theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

#language-select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}

/* Main Content */
main {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h1 {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5)); }
    to { filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.8)); }
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.subtitle strong {
    color: var(--success-color);
    font-size: 1.5rem;
}

/* Referral Container */
.referral-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.referral-box, .stats-box {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.referral-label {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.code-display {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#referral-code {
    flex: 1;
    padding: 1rem;
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    background: var(--bg-darker);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    color: var(--primary-color);
}

.btn-copy {
    padding: 1rem 1.5rem;
    background: var(--gradient-2);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

.btn-copy.copied {
    background: var(--success-color);
}

.btn-generate, .btn-enlist {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-generate {
    background: linear-gradient(135deg, #764ba2, #667eea);
    color: white;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(118, 75, 162, 0.4);
}

.btn-enlist {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
}

.btn-enlist:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.4);
}

/* URL Display - Improved Design */
.url-display {
    margin-top: 2rem;
}

.url-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0 1rem 0;
}

.url-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--border-color) 20%,
        var(--border-color) 80%,
        transparent);
}

.divider-text {
    position: relative;
    display: inline-block;
    padding: 0 1rem;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.url-box {
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg,
        rgba(0, 212, 255, 0.05),
        rgba(0, 212, 255, 0.02));
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.url-box:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.url-icon {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background: rgba(0, 212, 255, 0.1);
    border-right: 1px solid rgba(0, 212, 255, 0.2);
    font-size: 1.2rem;
}

#full-url {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Roboto Mono', monospace;
    white-space: nowrap;
    overflow-x: auto;
}

#full-url::-webkit-scrollbar {
    height: 4px;
}

#full-url::-webkit-scrollbar-track {
    background: rgba(0, 212, 255, 0.05);
}

#full-url::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.btn-copy-url {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.5rem;
    background: linear-gradient(135deg,
        rgba(0, 212, 255, 0.1),
        rgba(0, 212, 255, 0.2));
    border: none;
    border-left: 1px solid rgba(0, 212, 255, 0.2);
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-copy-url:hover {
    background: var(--primary-color);
    color: white;
}

.btn-copy-url.copied {
    background: var(--success-color);
    color: white;
}

.btn-copy-url.copied .copy-url-icon {
    animation: checkBounce 0.5s ease;
}

@keyframes checkBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.copy-url-icon {
    font-size: 1.1rem;
}

.copy-url-text {
    font-size: 0.9rem;
}

.url-hint {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
    font-style: italic;
}

/* Stats Box */
.stats-box h3 {
    font-family: 'Orbitron', monospace;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-darker);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.stat-number {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
}

/* Info Section */
.info-section {
    margin-top: 4rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.info-card h2 {
    font-family: 'Orbitron', monospace;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.info-card ol, .info-card ul {
    list-style-position: inside;
    line-height: 1.8;
    color: var(--text-secondary);
}

.info-card li {
    margin-bottom: 0.5rem;
}

/* Submit Form */
#submit-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

#submit-form input {
    padding: 0.75rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

#submit-form input::placeholder {
    color: var(--text-secondary);
}

.btn-submit {
    padding: 0.75rem;
    background: var(--gradient-2);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

.form-note {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* FAQ Section */
.faq-section {
    margin-top: 4rem;
}

.faq-section h2 {
    font-family: 'Orbitron', monospace;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 2rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.faq-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.faq-item summary {
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    list-style: none;
    position: relative;
    padding-left: 2rem;
}

.faq-item summary::before {
    content: "▶";
    position: absolute;
    left: 0;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::before {
    transform: rotate(90deg);
}

.faq-item p {
    margin-top: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 2rem;
}

/* Footer */
footer {
    position: relative;
    z-index: 10;
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .referral-container {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    nav {
        padding: 1rem;
    }

    main {
        padding: 1rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tip Box */
.tip-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    color: var(--text-primary);
}

.tip-box strong {
    color: var(--primary-color);
}

/* Small Text */
.small-text {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Countdown Timer */
.countdown-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid var(--secondary-color);
    border-radius: 10px;
}

.countdown-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.countdown-timer {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-align: center;
}

.countdown-timer span {
    color: #ff6b35;
}


/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-color: var(--success-color);
    background: rgba(76, 175, 80, 0.1);
}

.toast.error {
    border-color: var(--secondary-color);
    background: rgba(255, 107, 53, 0.1);
}

/* Floating Notification */
.floating-notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.95), rgba(0, 212, 255, 0.95));
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.4);
    z-index: 10000;
    animation: floatIn 0.5s ease forwards;
    font-weight: 600;
}

.notification-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes floatOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-40px);
    }
}

/* Enhanced Copy Button Animation */
.btn-copy:active {
    transform: scale(0.95);
}

.btn-copy.copied {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}