/* =========================================
   THATTUKADA DISCORD - PREMIUM CSS
   ========================================= */

    :root {
        /* Default: Light Mode (as requested: white theme with dark green) */
        --bg-main: #ffffff;
        --bg-secondary: #f4f7f5;
        --bg-tertiary: #e8eee9;
        --glass-bg: rgba(255, 255, 255, 0.7);
        --glass-border: rgba(0, 0, 0, 0.05);
        
        --primary: #1a5d1a;      /* Dark Green */
        --primary-glow: rgba(26, 93, 26, 0.2);
        --secondary: #2d8b2d;    /* Medium Green */
        --accent: #0f3d0f;       /* Deep Forest Green */
        
        --text-main: #121217;
        --text-muted: #666666;
        --text-dark: #060608;

        --font-heading: 'Outfit', sans-serif;
        --font-body: 'Outfit', sans-serif;
        --font-malayalam: 'Manjari', sans-serif;

        --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        --animation-slow: 8s linear infinite;
    }

    /* Dark Mode Theme */
    [data-theme="dark"] {
        --bg-main: #060608;
        --bg-secondary: #121217;
        --bg-tertiary: #191a23;
        --glass-bg: rgba(20, 20, 25, 0.6);
        --glass-border: rgba(255, 255, 255, 0.05);
        
        --primary: #2d8b2d;      /* Vibrant Green for dark mode */
        --primary-glow: rgba(45, 139, 45, 0.4);
        --secondary: #4caf50;    /* Light Green */
        --accent: #1a5d1a;       /* Dark Green */
        
        --text-main: #f8f8f8;
        --text-muted: #a0a0ab;
        --text-dark: #121217;
    }

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
}
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}
.highlight {
    background: linear-gradient(135deg, var(--secondary), var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    z-index: -1;
    transition: opacity var(--transition);
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    border-color: var(--primary);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.5rem 0;
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    font-family: var(--font-malayalam);
}

.logo i {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

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

.nav-cta {
    background: var(--primary);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
    background: var(--accent);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Theme Toggle */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.theme-switch {
    display: inline-block;
    height: 30px;
    position: relative;
    width: 54px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: var(--bg-tertiary);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    border: 1px solid var(--glass-border);
}

.slider i {
    font-size: 12px;
    color: var(--text-muted);
}

.slider:before {
    background-color: var(--primary);
    bottom: 4px;
    content: "";
    height: 22px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 22px;
    border-radius: 50%;
    z-index: 2;
}

input:checked + .slider:before {
    transform: translateX(24px);
    background-color: var(--text-main);
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(rgba(6, 6, 8, 0.7), rgba(6, 6, 8, 0.85)), url('a_d3e09f17312dd1bf3e2c15ff76a9088c.gif');
    background-size: cover;
    background-position: center;
}

.blob {
    position: absolute;
    filter: blur(100px);
    opacity: 0.3;
    animation: float var(--animation-slow);
}

.blob-1 {
    top: 10%;
    left: 20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 112, 67, 0.4);
    border-radius: 50%;
}

.blob-2 {
    bottom: 20%;
    right: 15%;
    width: 500px;
    height: 500px;
    background: rgba(255, 183, 77, 0.3);
    border-radius: 50%;
    animation-delay: 2s;
}

.blob-3 {
    top: 40%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: rgba(255, 87, 34, 0.2);
    border-radius: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

.hero-content {
    max-width: 800px;
    text-align: center;
    z-index: 10;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 2rem;
    display: inline-block;
    animation: fadeInDown 1s ease;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-title .highlight {
    font-family: var(--font-malayalam);
    display: block;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease 0.6s both;
}

.stats-container {
    display: flex;
    gap: 3rem;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease 0.8s both;
    position: relative;
    overflow: hidden;
}

.stats-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--primary), var(--accent));
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number-wrapper {
    display: flex;
    align-items: baseline;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.stat-suffix {
    font-size: inherit;
    font-weight: inherit;
    color: var(--primary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sections Global */
section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title span {
    color: var(--primary);
}

.section-subtitle {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

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

/* About Section */
.about {
    background: var(--bg-secondary);
}

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

.about-card {
    background: var(--bg-main);
    border: 1px solid var(--glass-border);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.about-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-glow);
    box-shadow: 0 10px 30px rgba(0,0,0, 0.4);
}

.about-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: var(--primary-glow);
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0;
    transition: var(--transition);
}

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

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: var(--glass-bg);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.about-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.about-card p {
    color: var(--text-muted);
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.feature-item:hover {
    background: var(--bg-tertiary);
    border-color: rgba(255, 112, 67, 0.3);
    transform: scale(1.02);
}

.feature-icon {
    background: linear-gradient(135deg, rgba(255, 112, 67, 0.1), rgba(255, 87, 34, 0.1));
    color: var(--primary);
    width: 60px;
    height: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
    border: 1px solid rgba(255, 112, 67, 0.2);
}

.feature-text h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.feature-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Live Community */
.live-community {
    background: var(--bg-secondary);
    position: relative;
}

.widget-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    padding: 0 5%;
}

.widget-crop-container {
    width: 100%;
    max-width: 800px;  /* Made it wider */
    height: 500px;     /* Keeps member list tall */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: var(--bg-main);
}

.discord-widget {
    width: 100%;
    /* Increased height to allow more scrolling space for members */
    height: calc(100% + 240px); 
    /* Increased negative margin to hide both the header AND the channel list */
    margin-top: -155px; 
    border: none;
    border-radius: 0;
    transition: var(--transition);
}

.widget-crop-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--primary-glow);
}

.members-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    min-height: 200px;
    position: relative;
}

.member-card {
    background: var(--bg-main);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    animation: fadeIn 0.5s ease both;
}

.member-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-glow);
}

.member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-main);
}

.status-online { background: #23a559; }
.status-idle { background: #f1c40f; }
.status-dnd { background: #f04747; }

.member-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.member-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--bg-tertiary);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* CTA Section */
.cta {
    padding: 4rem 5%;
}

.cta-card {
    background: linear-gradient(135deg, rgba(25,26,35,0.8), rgba(18,18,23,0.9)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.05"><path d="M0 0h10v10H0z" fill="%23FFFFFF"/></svg>');
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, var(--secondary), var(--primary), var(--accent));
}

.cta-card h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-card p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 112, 67, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 112, 67, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 112, 67, 0); }
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 5% 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-family: var(--font-malayalam);
}
.footer-logo i { color: var(--primary); }

.brand-col p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 400px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--primary);
}

.footer-col a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
    color: #666;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
    .stats-container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-cta {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}
