/* Shared CSS for Public Pages (Login, Commands, Leaderboard, Help) */
:root {
    --bg-dark: #0a0a12;
    --bg-card: #13131f;
    --primary: #6366f1;
    --accent: #fbbf24;
    --success: #22c55e;
    --text-main: #e8e8f0;
    --text-muted: #6b7280;
    --border-color: #1f1f2e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.15) 1px, transparent 0),
        radial-gradient(1px 1px at 30% 70%, rgba(255, 255, 255, 0.1) 1px, transparent 0),
        radial-gradient(1px 1px at 50% 30%, rgba(255, 255, 255, 0.15) 1px, transparent 0),
        radial-gradient(1px 1px at 70% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 0);
    background-attachment: fixed;
}

/* === TOP NAVBAR === */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 18, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.3px;
}

.navbar-links {
    display: flex;
    gap: 30px;
}

.navbar-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.navbar-links a:hover { color: var(--text-main); }
.navbar-links a.active { color: var(--primary); }

.group-title {
    font-family: 'Consolas', 'Monaco', monospace;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 1.1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    margin-bottom: 30px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.group-title i {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 1.2rem;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
    flex-shrink: 0;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    letter-spacing: normal !important; /* Fix inheritance */
    text-indent: 0 !important; /* Fix inheritance */
}

.group-count {
    margin-left: auto;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.module-card {
    position: relative;
    padding: 25px !important;
    padding-top: 40px !important;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.01);
}

.module-status {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    opacity: 0.5;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 15px; /* Better position */
    left: 15px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 2s infinite;
}

.module-card.twitch-module .module-status,
.module-card.twitch-module::before {
    background: #9146ff;
    box-shadow: 0 0 10px #9146ff;
}

.command-name {
    font-family: 'Inter', sans-serif; /* Back to Inter for names, easier to read */
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
}

.command-usage {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.module-card.twitch-module .command-usage {
    border-left-color: #9146ff;
}

.command-usage code {
    color: var(--text-main);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
}

.category-tag {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

.tag-eco { background: rgba(34, 197, 94, 0.1); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.2); }
.tag-fun { background: rgba(236, 72, 153, 0.1); color: #ec4899; border: 1px solid rgba(236, 72, 153, 0.2); }
.tag-util { background: rgba(99, 102, 241, 0.1); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.2); }
.tag-mod { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px 20px;
    animation: fadeIn 0.6s ease-out;
}

.hero-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 24px;
    border: 2px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #5865F2;
    color: white;
    text-decoration: none;
    padding: 14px 36px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.3);
}

.btn-discord:hover {
    background: #4752C4;
    transform: translateY(-3px);
}

/* === FOOTER === */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: auto;
}

/* === GENERIC PAGE CONTENT === */
.page-container {
    flex: 1;
    padding: 120px 40px 60px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 20px; text-align: center; }
.page-title span { color: var(--primary); }

.page-intro {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* Leaderboard Table */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-table th {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.rank-badge {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.rank-1 .rank-badge { background: linear-gradient(135deg, #FFD700, #FDB931); color: #000; box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.rank-2 .rank-badge { background: linear-gradient(135deg, #E0E0E0, #BDBDBD); color: #000; }
.rank-3 .rank-badge { background: linear-gradient(135deg, #CD7F32, #A0522D); color: #000; }

/* Commands Page */
.platform-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.platform-btn {
    flex: 1;
    max-width: 300px;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 12px 30px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.platform-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.search-container {
    max-width: 500px;
    margin: 0 auto 40px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 20px 15px 45px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.commands-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }

.command-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.2s;
}

.command-card:hover {
    border-color: var(--primary);
}

.command-name { font-family: 'Consolas', monospace; color: var(--primary); font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; display: block; }
.command-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

/* FAQ Styles */
.faq-section { max-width: 800px; margin: 0 auto 60px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; margin-bottom: 16px; overflow: hidden; }
.faq-question { padding: 24px; font-size: 1.1rem; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-answer { padding: 0 24px; max-height: 0; overflow: hidden; color: var(--text-muted); transition: all 0.3s; }
.faq-item.active .faq-answer { padding-bottom: 24px; max-height: 500px; }

.support-contact {
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    margin: 40px auto;
}

/* === RESPONSIVE MOBILE === */
@media (max-width: 992px) {
    .navbar { padding: 10px 15px; flex-direction: column; align-items: flex-start; gap: 8px; position: relative; }
    .nav-left { width: 100%; display: flex; flex-direction: column; gap: 10px; }
    .navbar-brand { font-size: 0.95rem; }
    .navbar-links { width: 100%; justify-content: space-around; border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 8px; }
    .navbar-links a { font-size: 0.75rem; }

    .hero { padding: 0 15px; height: auto; flex: 1; justify-content: center; gap: 2vh; }
    .hero-avatar { width: clamp(60px, 15vh, 80px); height: clamp(60px, 15vh, 80px); margin-bottom: 0; }
    .hero h1 { font-size: clamp(1.3rem, 6vw, 1.8rem); line-height: 1.1; margin-bottom: 0; }
    .hero h1 .mobile-wrap { display: block; }
    .hero p { font-size: clamp(0.8rem, 4vw, 0.95rem); margin-bottom: 2vh; max-width: 90%; }
    .btn-discord { padding: 12px 24px; font-size: 0.85rem; }

    .footer { padding: 10px; font-size: 0.65rem; }

    .page-container { padding: 100px 20px 40px; }
    .page-title { font-size: 1.8rem; }

    /* Tables */
    .leaderboard-table tr { display: grid; grid-template-columns: 40px 1fr auto; padding: 15px; border-bottom: 1px solid var(--border-color); align-items: center; }
    .leaderboard-table thead { display: none; }
    
    /* Commands */
    .platform-tabs { gap: 10px; }
    .platform-btn { padding: 10px 15px; font-size: 0.9rem; }
    .platform-btn span { display: none; }
    .platform-btn i { font-size: 1.4rem; margin: 0; }
}

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