/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0e27;
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light Mode */
body.light-mode {
    background: #f5f5f7;
    color: #1d1d1f;
}

body.light-mode::before {
    background: 
        radial-gradient(circle at 20% 50%, rgba(147, 0, 195, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(74, 195, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(147, 0, 195, 0.1) 0%, transparent 50%);
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(147, 0, 195, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(74, 195, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(147, 0, 195, 0.2) 0%, transparent 50%);
    animation: backgroundShift 15s ease infinite;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    padding: 100px 20px 80px;
    position: relative;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    animation: fadeInDown 1s ease;
}

.bot-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid rgba(147, 0, 195, 0.5);
    box-shadow: 
        0 0 40px rgba(147, 0, 195, 0.6),
        0 0 80px rgba(74, 195, 0, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.5);
    object-fit: cover;
    animation: float 3s ease-in-out infinite, glow 2s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.bot-avatar:hover {
    transform: scale(1.1) rotate(5deg);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 40px rgba(147, 0, 195, 0.6), 0 0 80px rgba(74, 195, 0, 0.4); }
    50% { box-shadow: 0 0 60px rgba(147, 0, 195, 0.8), 0 0 100px rgba(74, 195, 0, 0.6); }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header h1 {
    font-size: 4.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #9300C3 0%, #4AC300 50%, #9300C3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(147, 0, 195, 0.5);
    animation: fadeInDown 1s ease 0.2s both;
    letter-spacing: -2px;
}

.tagline {
    font-size: 1.5rem;
    color: #b794f6;
    font-weight: 400;
    animation: fadeInDown 1s ease 0.4s both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* About Section */
.about {
    padding: 60px 40px;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    margin: 0 20px 40px;
    border: 1px solid rgba(147, 0, 195, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 1s ease 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about h2 {
    font-size: 2.8rem;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #9300C3 0%, #4AC300 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.about p {
    font-size: 1.2rem;
    line-height: 1.9;
    color: #d1d5db;
}

.about code {
    background: rgba(74, 195, 0, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    color: #4AC300;
    font-weight: 600;
    border: 1px solid rgba(74, 195, 0, 0.3);
    transition: all 0.3s ease;
}

.about code:hover {
    background: rgba(74, 195, 0, 0.3);
    transform: translateY(-2px);
}

/* Stats Section */
.stats {
    padding: 40px;
    text-align: center;
    animation: fadeInUp 1s ease 0.8s both;
}

.stat-card {
    display: inline-block;
    padding: 40px 70px;
    background: linear-gradient(135deg, rgba(147, 0, 195, 0.2) 0%, rgba(74, 195, 0, 0.2) 100%);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    border: 2px solid rgba(147, 0, 195, 0.3);
    box-shadow: 
        0 20px 60px rgba(147, 0, 195, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 
        0 30px 80px rgba(147, 0, 195, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(74, 195, 0, 0.6);
}

.stat-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #b794f6;
    font-weight: 600;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 400;
    color: #e9d5ff;
}

#server-count {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #9300C3 0%, #4AC300 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Invite Button */
.invite-section {
    padding: 60px 40px;
    text-align: center;
    animation: fadeInUp 1s ease 1s both;
}

.invite-btn {
    display: inline-block;
    padding: 22px 60px;
    background: linear-gradient(135deg, #9300C3 0%, #4AC300 50%, #9300C3 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 
        0 20px 60px rgba(147, 0, 195, 0.4),
        0 0 40px rgba(74, 195, 0, 0.3);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.invite-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.invite-btn:hover::before {
    left: 100%;
}

.invite-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 30px 80px rgba(147, 0, 195, 0.6),
        0 0 60px rgba(74, 195, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.invite-btn:active {
    transform: translateY(-2px) scale(1.02);
}

/* Commands Section */
.commands {
    padding: 80px 40px;
    animation: fadeInUp 1s ease 1.2s both;
}

.commands h2 {
    font-size: 3.5rem;
    margin-bottom: 60px;
    text-align: center;
    background: linear-gradient(135deg, #9300C3 0%, #4AC300 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.command-category {
    margin-bottom: 60px;
    animation: fadeInUp 1s ease both;
}

.command-category h3 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #b794f6;
    padding-bottom: 15px;
    border-bottom: 3px solid rgba(74, 195, 0, 0.3);
    font-weight: 700;
    position: relative;
}

.command-category h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #9300C3 0%, #4AC300 100%);
    border-radius: 3px;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.command-item {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(147, 0, 195, 0.2);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.command-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #9300C3 0%, #4AC300 100%);
    transform: scaleY(0);
    transition: transform 0.4s ease;
}

.command-item:hover::before {
    transform: scaleY(1);
}

.command-item:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 40px rgba(147, 0, 195, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(74, 195, 0, 0.5);
    background: rgba(17, 24, 39, 0.8);
}

.command-item code {
    display: block;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 1.1rem;
    color: #4AC300;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(74, 195, 0, 0.5);
}

.command-item span {
    display: block;
    font-size: 1rem;
    color: #9ca3af;
    line-height: 1.6;
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(147, 0, 195, 0.2);
    animation: fadeInUp 1s ease 1.4s both;
}

footer p {
    margin: 15px 0;
    font-size: 1.2rem;
    color: #b794f6;
}

footer a {
    color: #9300C3;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #9300C3 0%, #4AC300 100%);
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

footer a:hover {
    color: #4AC300;
}

.footer-note {
    font-size: 1.4rem;
    margin-top: 20px;
    background: linear-gradient(135deg, #9300C3 0%, #4AC300 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* Sparkle Effect */
.sparkle {
    position: fixed;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #4AC300 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: sparkleAnimation 1s ease-out forwards;
    z-index: 9999;
}

@keyframes sparkleAnimation {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(2) rotate(180deg);
        opacity: 0;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #0a0e27;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #9300C3 0%, #4AC300 100%);
    border-radius: 10px;
    border: 2px solid #0a0e27;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #9d6dd9 0%, #4AC300 100%);
}

/* Selection Color */
::selection {
    background: rgba(147, 0, 195, 0.3);
    color: #fff;
}

/* Warning Banner */
.warning-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 16px 20px;
    z-index: 10002;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    animation: slideDown 0.8s ease-out 0.5s forwards, warningPulse 2s ease-in-out 1.3s infinite;
    opacity: 0;
    transform: translateY(-100%);
}

@keyframes slideDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes warningPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(220, 38, 38, 0.5);
    }
    50% {
        box-shadow: 0 4px 30px rgba(220, 38, 38, 0.8);
    }
}

.warning-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.warning-icon {
    font-size: 1.5rem;
    animation: warningShake 1.5s ease-in-out infinite;
}

@keyframes warningShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.warning-text {
    line-height: 1.5;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0e27;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
}

.loader-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border: 4px solid rgba(147, 0, 195, 0.2);
    border-top: 4px solid #9300C3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #9300C3 0%, #4AC300 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Theme Switcher */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

#theme-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(147, 0, 195, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(147, 0, 195, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(147, 0, 195, 0.3);
    box-shadow: 0 6px 20px rgba(147, 0, 195, 0.4);
}

.theme-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(147, 0, 195, 0.3);
    padding: 8px;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.theme-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-option {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #b794f6;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-option:hover {
    background: rgba(147, 0, 195, 0.2);
    color: #fff;
}

.theme-option.active {
    background: rgba(147, 0, 195, 0.3);
    color: #fff;
}

/* Light Mode Overrides */
body.light-mode .about {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(147, 0, 195, 0.2);
}

body.light-mode .about p {
    color: #1d1d1f;
}

body.light-mode .about code {
    background: rgba(74, 195, 0, 0.15);
    color: #4AC300;
    border: 1px solid rgba(74, 195, 0, 0.3);
}

body.light-mode .stat-card {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(147, 0, 195, 0.3);
}

body.light-mode .stat-card h3 {
    color: #9300C3;
}

body.light-mode .stat-number {
    color: #1d1d1f;
}

body.light-mode .command-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(147, 0, 195, 0.2);
}

body.light-mode .command-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(74, 195, 0, 0.4);
}

body.light-mode .command-item span {
    color: #4a4a4a;
}

body.light-mode .command-category h3 {
    color: #9300C3;
    border-bottom: 3px solid rgba(74, 195, 0, 0.3);
}

body.light-mode footer {
    border-top: 1px solid rgba(147, 0, 195, 0.2);
}

body.light-mode footer p {
    color: #9300C3;
}

body.light-mode footer a {
    color: #9300C3;
}

body.light-mode footer a:hover {
    color: #4AC300;
}

body.light-mode #theme-toggle {
    background: rgba(147, 0, 195, 0.15);
    border: 2px solid rgba(147, 0, 195, 0.3);
}

body.light-mode .theme-menu {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(147, 0, 195, 0.3);
}

body.light-mode .theme-option {
    color: #9300C3;
}

body.light-mode .theme-option:hover {
    background: rgba(147, 0, 195, 0.1);
    color: #9300C3;
}

body.light-mode .theme-option.active {
    background: rgba(147, 0, 195, 0.2);
}

body.light-mode #loading-screen {
    background: #f5f5f7;
}

body.light-mode .loader-circle {
    border: 4px solid rgba(147, 0, 195, 0.2);
    border-top: 4px solid #9300C3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .warning-content {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .warning-icon {
        font-size: 1.2rem;
    }

    header h1 {
        font-size: 2.8rem;
        letter-spacing: -1px;
    }

    .logo-section {
        flex-direction: column;
    }

    .bot-avatar {
        width: 120px;
        height: 120px;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .about, .commands {
        padding: 40px 20px;
        margin: 0 10px 30px;
    }

    .about h2, .commands h2 {
        font-size: 2.2rem;
    }

    .command-grid {
        grid-template-columns: 1fr;
    }

    .invite-btn {
        padding: 18px 45px;
        font-size: 1.2rem;
    }

    .stat-card {
        padding: 30px 50px;
    }

    #server-count {
        font-size: 2rem;
    }
    
    .theme-switcher {
        top: 15px;
        right: 15px;
    }
    
    #theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}
