/*
  THC Labs Design System: Forest Cybernetic Theme (Verde/Marrón)
  Developed for thehashcode.org
*/

:root {
    /* Color Palette */
    --bg-dark: #090e0a;         /* Extremely dark forest-black background */
    --bg-deep: #050805;         /* Deeper black-green for headers/footers */
    
    /* Green tones (Leaves, moss, glow) */
    --green-primary: #38b000;    /* Bright leaf green */
    --green-glow: rgba(56, 176, 0, 0.45);
    --green-muted: #1b4314;     /* Deep forest moss green */
    --green-neon: #70e000;       /* Neon lime-green for highlights */
    
    /* Brown tones (Trunk, branches, soil) */
    --brown-primary: #8b5a2b;    /* Warm wood brown */
    --brown-glow: rgba(139, 90, 43, 0.35);
    --brown-muted: #3d2511;     /* Dark earthy bark brown */
    --brown-light: #b07d4f;     /* Pine wood color */
    
    /* Golden honey tones (Sunlight through trees, amber alerts) */
    --gold-primary: #d4a373;     /* Honey gold */
    --gold-glow: rgba(212, 163, 115, 0.4);
    
    /* UI Text colors */
    --text-main: #f0f5f1;       /* Warm off-white */
    --text-muted: #95a596;      /* Muted leaf-vein grey/green */
    --text-dark: #1b261c;
    
    /* Glassmorphism settings */
    --glass-bg-green: rgba(14, 25, 17, 0.65);
    --glass-border-green: rgba(74, 222, 128, 0.15);
    --glass-bg-brown: rgba(26, 18, 12, 0.6);
    --glass-border-brown: rgba(212, 163, 115, 0.12);
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* WebKit Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
    background: var(--green-muted);
    border-radius: 4px;
    border: 1px solid var(--glass-border-green);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--green-primary);
}

/* Scanlines and background organic ambiance */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.12) 50%
    );
    background-size: 100% 4px;
    z-index: 999;
    pointer-events: none;
    opacity: 0.4;
}

.forest-bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(27, 67, 20, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 15%, rgba(61, 37, 17, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 50% 80%, rgba(112, 224, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -2;
}

/* Animated floating particles/fireflies in background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--green-primary) 1px, transparent 1px);
    background-size: 120px 120px;
    background-position: 0 0;
    opacity: 0.03;
    animation: floatParticles 45s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes floatParticles {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* Header design */
.main-header {
    background-color: var(--bg-deep);
    border-bottom: 2px solid var(--green-muted);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-icon-wrapper {
    background: radial-gradient(circle, var(--green-muted) 30%, transparent 80%);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--green-primary);
    animation: pulseGlow 3s ease-in-out infinite alternate;
}

.logo-leaf {
    color: var(--green-neon);
    font-size: 1.4rem;
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.1;
}

.accent-text {
    color: var(--green-neon);
    text-shadow: 0 0 10px var(--green-glow);
}

.sublogo-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Live Server Status */
.server-status-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border-green);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background-color: var(--green-neon);
    box-shadow: 0 0 8px var(--green-neon);
    animation: flashStatus 1.5s infinite alternate;
}

.status-label {
    color: var(--text-main);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-time {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Social Buttons */
.header-socials {
    display: flex;
    gap: 0.8rem;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.discord-btn {
    background-color: #5865f2;
    box-shadow: 0 2px 10px rgba(88, 101, 242, 0.3);
}
.discord-btn:hover {
    background-color: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.5);
}

.whatsapp-btn {
    background-color: #25d366;
    box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3);
}
.whatsapp-btn:hover {
    background-color: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.5);
}

/* Grid Dashboard Container */
.dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr 340px;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Panels (Glassmorphism design system) */
.glass-panel {
    background: var(--glass-bg-green);
    border: 1px solid var(--glass-border-green);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: rgba(112, 224, 0, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 15px rgba(112, 224, 0, 0.05);
}

/* Wooden-themed panels */
.glass-panel.discord-widget, .glass-panel.events-widget {
    background: var(--glass-bg-brown);
    border-color: var(--glass-border-brown);
}
.glass-panel.discord-widget:hover, .glass-panel.events-widget:hover {
    border-color: rgba(212, 163, 115, 0.25);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 163, 115, 0.05);
}

.panel-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-icon {
    color: var(--green-neon);
}
.discord-widget .panel-icon {
    color: var(--gold-primary);
}

.panel-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.panel-content {
    padding: 1rem;
    flex-grow: 1;
}

.panel-content.scrollable {
    max-height: 380px;
    overflow-y: auto;
}

/* Custom UI badges */
.badge {
    background: rgba(112, 224, 0, 0.15);
    color: var(--green-neon);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(112, 224, 0, 0.3);
}

.discord-widget .badge {
    background: rgba(212, 163, 115, 0.15);
    color: var(--gold-primary);
    border-color: rgba(212, 163, 115, 0.3);
}

/* Left Sidebar Elements */
/* Discord User List */
.discord-user-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.discord-user-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.3rem 0;
}

.avatar-wrapper {
    position: relative;
    width: 34px;
    height: 34px;
}

.user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--text-muted);
}

.user-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
}
.user-status-dot.online { background-color: #23a55a; }
.user-status-dot.idle { background-color: #f0b232; }
.user-status-dot.dnd { background-color: #f23f43; }

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-game {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-game strong {
    color: var(--green-neon);
}

/* Voice Chat Status */
.voice-chat-status {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.8rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.vc-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.vc-header i {
    color: #23a55a;
    animation: pulseScale 1s infinite alternate;
}

.vc-users {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.vc-user-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-main);
}

.vc-user-tag i {
    font-size: 0.6rem;
    color: var(--green-neon);
}

/* Stats / Server Monitor */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.spacer-top {
    margin-top: 1.2rem;
}

.stat-name {
    color: var(--text-main);
    font-weight: 500;
}

.stat-value {
    font-weight: 600;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.text-green { color: var(--green-neon); }
.text-amber { color: var(--gold-primary); }

.stat-progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
}

.fill-green {
    background: linear-gradient(90deg, var(--green-muted), var(--green-primary));
    box-shadow: 0 0 5px var(--green-glow);
}

.stat-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Center Content & Apps Grid */
.section-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.section-title-wrapper h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.header-icon-green {
    color: var(--green-neon);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

/* App Card Designs */
.app-card {
    background: var(--glass-bg-green);
    border: 1px solid var(--glass-border-green);
    border-radius: 10px;
    padding: 1.2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background-color: var(--green-primary);
}

/* Custom card theme categories */
.app-card.card-brown {
    background: var(--glass-bg-brown);
    border-color: var(--glass-border-brown);
}
.app-card.card-brown::before {
    background-color: var(--brown-primary);
}

.app-card.card-gold {
    background: rgba(30, 25, 15, 0.65);
    border-color: rgba(212, 163, 115, 0.15);
}
.app-card.card-gold::before {
    background-color: var(--gold-primary);
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.app-card.card-green:hover {
    border-color: var(--green-primary);
    box-shadow: 0 8px 25px rgba(56, 176, 0, 0.15);
}
.app-card.card-brown:hover {
    border-color: var(--brown-primary);
    box-shadow: 0 8px 25px rgba(139, 90, 43, 0.15);
}
.app-card.card-gold:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 8px 25px rgba(212, 163, 115, 0.18);
}

.app-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.card-green .app-icon-box {
    color: var(--green-neon);
    background: rgba(112, 224, 0, 0.06);
}
.card-brown .app-icon-box {
    color: var(--brown-light);
    background: rgba(139, 90, 43, 0.06);
}
.card-gold .app-icon-box {
    color: var(--gold-primary);
    background: rgba(212, 163, 115, 0.06);
}

.app-details h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.app-details p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.app-domain {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: var(--green-neon);
    letter-spacing: 0.5px;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.card-brown .app-domain {
    color: var(--brown-light);
}
.card-gold .app-domain {
    color: var(--gold-primary);
}

.app-delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.2rem;
    border-radius: 4px;
    z-index: 5;
    transition: var(--transition-smooth);
    opacity: 0;
}

.app-card:hover .app-delete-btn {
    opacity: 1;
}

.app-delete-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Pixel Art Board Panel */
.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pixel-live-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #ef4444;
    box-shadow: 0 0 5px #ef4444;
}

.pixel-board-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.pixel-controls {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.tool-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.8rem;
    border-radius: 8px;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.5rem;
}

/* Color grid selection */
.color-palette {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.color-option {
    aspect-ratio: 1;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.color-option:hover {
    transform: scale(1.15);
    border-color: white;
}

.color-option.selected {
    border-color: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

/* Custom color picker eye-dropper */
.custom-color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.custom-color-picker-wrapper input[type="color"] {
    flex-grow: 1;
    height: 20px;
    border: none;
    background: none;
    cursor: pointer;
}

/* Tool control buttons */
.tool-buttons {
    display: flex;
    gap: 0.4rem;
}

.tool-btn {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.tool-btn.active {
    background: rgba(112, 224, 0, 0.15);
    border-color: var(--green-primary);
    color: var(--green-neon);
    box-shadow: 0 0 10px rgba(112, 224, 0, 0.1);
}

/* Canvas output styling */
.canvas-wrapper {
    background: #020402;
    border: 2px solid var(--green-muted);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    max-width: 480px;
    margin: 0 auto;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.9);
}

#pixel-canvas {
    image-rendering: pixelated;
    display: block;
    cursor: crosshair;
    max-width: 100%;
    max-height: 100%;
}

/* Right Sidebar: Chat Client */
.chat-widget {
    height: 480px;
}

.chat-config-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-config-bar input {
    flex-grow: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.color-picker-mini {
    display: flex;
    gap: 0.25rem;
}

.color-dot-choice {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid transparent;
}
.color-dot-choice:hover, .color-dot-choice.selected {
    border-color: white;
}

.chat-messages {
    flex-grow: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    max-width: 90%;
    animation: fadeInMessage 0.25s ease-out;
}

.chat-message.self {
    align-self: flex-end;
}

.msg-header {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.7rem;
}

.msg-username {
    font-weight: 700;
}

.msg-time {
    color: var(--text-muted);
}

.msg-body {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.5rem 0.7rem;
    border-radius: 0 10px 10px 10px;
    font-size: 0.8rem;
    line-height: 1.4;
    word-break: break-word;
}

.chat-message.self .msg-body {
    background: rgba(56, 176, 0, 0.08);
    border-color: rgba(56, 176, 0, 0.2);
    border-radius: 10px 0 10px 10px;
}

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

.chat-input-bar {
    display: flex;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    gap: 0.5rem;
}

.chat-input-bar input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    color: var(--text-main);
    font-size: 0.8rem;
    transition: var(--transition-smooth);
}

.chat-input-bar input:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 8px var(--green-glow);
}

.chat-send-btn {
    background: var(--green-muted);
    border: 1px solid var(--green-primary);
    color: var(--green-neon);
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.chat-send-btn:hover {
    background: var(--green-primary);
    color: var(--bg-dark);
    box-shadow: 0 0 10px var(--green-glow);
}

/* Right Sidebar: Events calendar */
.events-widget {
    max-height: 380px;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.event-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-left: 3px solid var(--gold-primary);
    padding: 0.8rem;
    border-radius: 4px;
    position: relative;
    transition: var(--transition-smooth);
}

.event-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(3px);
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.event-card-header h4 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
}

.event-date-badge {
    font-size: 0.65rem;
    color: var(--gold-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.event-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.event-platform-tag {
    display: inline-block;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 3px;
    padding: 0.1rem 0.3rem;
    font-size: 0.65rem;
    margin-top: 0.3rem;
    color: var(--text-main);
}

.event-delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.2);
    cursor: pointer;
    font-size: 0.7rem;
    transition: var(--transition-smooth);
    opacity: 0;
}

.event-card:hover .event-delete-btn {
    opacity: 1;
}

.event-delete-btn:hover {
    color: #ef4444;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.25s ease;
}

.modal-backdrop.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.glass-modal {
    background: rgba(14, 25, 17, 0.95);
    border: 2px solid var(--green-primary);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 176, 0, 0.15);
    width: 90%;
    max-width: 460px;
    border-radius: 12px;
    overflow: hidden;
    animation: modalShow 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes modalShow {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    padding: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green-neon);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}
.modal-close:hover {
    color: #ef4444;
}

.modal-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.form-group input, .form-group select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 8px var(--green-glow);
}

.theme-color-options {
    display: flex;
    gap: 0.8rem;
}

.radio-color-option {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    font-size: 0.8rem;
}

.radio-color-option input {
    cursor: pointer;
}

.option-green { color: var(--green-neon); }
.option-brown { color: var(--brown-light); }
.option-gold { color: var(--gold-primary); }

.modal-footer {
    padding: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

/* UI Buttons styling */
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}
.btn-xs {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
}

.btn-primary {
    background: var(--green-primary);
    color: var(--bg-dark);
}
.btn-primary:hover {
    background: var(--green-neon);
    box-shadow: 0 0 12px var(--green-neon);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}
.btn-danger:hover {
    background: #ef4444;
    color: var(--text-main);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.2rem;
    border-radius: 4px;
    transition: var(--transition-smooth);
}
.btn-icon:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.btn-icon-green {
    background: rgba(112, 224, 0, 0.1);
    border: 1px solid rgba(112, 224, 0, 0.2);
    color: var(--green-neon);
    cursor: pointer;
    font-size: 0.85rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition-smooth);
}
.btn-icon-green:hover {
    background: var(--green-primary);
    color: var(--bg-dark);
    box-shadow: 0 0 8px var(--green-glow);
}

.w-100 { width: 100%; }
.spacer-top-xs { margin-top: 0.25rem; }
.spacer-top-sm { margin-top: 0.5rem; }
.hidden { display: none !important; }

/* Switch Toggle Slider */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.toggle-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-muted);
    transition: .3s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: rgba(112, 224, 0, 0.2);
    border-color: var(--green-primary);
}
input:checked + .slider:before {
    transform: translateX(14px);
    background-color: var(--green-neon);
}

/* Footer Section */
.main-footer {
    background-color: var(--bg-deep);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 3rem;
}

/* Micro-animations */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 5px rgba(112, 224, 0, 0.2);
    }
    100% {
        box-shadow: 0 0 15px rgba(112, 224, 0, 0.5);
    }
}

@keyframes flashStatus {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

@keyframes pulseScale {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.animate-pulse {
    animation: flashStatus 1.5s infinite alternate;
}

/* Navigation Tabs Bar styling */
.tab-navigation {
    display: flex;
    gap: 0.6rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tab-btn i {
    font-size: 0.9rem;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.tab-btn.active {
    background: rgba(112, 224, 0, 0.15);
    border-color: var(--green-primary);
    color: var(--green-neon);
    box-shadow: 0 0 10px rgba(112, 224, 0, 0.15);
}

/* Views display toggles */
.views-wrapper {
    position: relative;
    width: 100%;
}

.tab-view.hidden {
    display: none !important;
}

/* Masked Pixel Board Preview Card (Zone Mask) */
.pixel-preview-card {
    padding: 1.5rem;
}

.preview-layout {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.preview-mask-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    flex-shrink: 0;
    border: 3px solid var(--brown-primary);
    border-radius: 8px;
    box-shadow: 0 0 15px var(--brown-glow), inset 0 0 20px rgba(0,0,0,0.9);
    overflow: hidden;
}

.preview-mask-window {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background-color: #020402;
}

#pixel-canvas-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 512px !important;
    height: 512px !important;
    max-width: none !important;
    max-height: none !important;
    image-rendering: pixelated;
    display: block;
    pointer-events: none;
    transition: top 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), left 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.glow-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 8px;
    border: 1px dashed var(--gold-primary);
    opacity: 0.35;
    animation: rotateGlowRing 25s linear infinite;
    pointer-events: none;
}

@keyframes rotateGlowRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.preview-details {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.preview-details h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.preview-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

/* Full Width Pixel Art Canvas Layout */
.full-pixel-layout {
    grid-column: span 3;
    padding: 1.5rem;
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
}

.canvas-wrapper-full {
    background: #020402;
    border: 3px solid var(--green-muted);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    max-width: 78vh;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(0, 0, 0, 0.95);
}

.navigation-info-box {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .dashboard-container {
        grid-template-columns: 260px 1fr;
    }
    .sidebar-right {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .chat-widget, .events-widget {
        height: 380px;
        margin-top: 0 !important;
    }
}

@media (max-width: 860px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
    .sidebar-left, .sidebar-right {
        grid-column: span 1;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .sidebar-right {
        grid-template-columns: 1fr;
    }
    .main-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }
    .header-logo {
        flex-direction: column;
    }
    .tab-navigation {
        width: 100%;
        justify-content: center;
    }
    .pixel-board-layout {
        grid-template-columns: 1fr;
    }
    .canvas-wrapper-full {
        max-width: 100%;
    }
    .preview-layout {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .preview-mask-wrapper {
        margin: 0 auto;
    }
}

/* Sound Toggle Button */
.sound-toggle-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.sound-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--green-neon);
    border-color: var(--green-primary);
    box-shadow: 0 0 10px rgba(112, 224, 0, 0.2);
}

/* Dynamic Particle System (Leaves, Sparks, Joint Butts) */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    pointer-events: none;
    user-select: none;
    will-change: transform, opacity;
}

/* Forest green leaves falling down */
.particle.leaf {
    background-color: var(--green-primary);
    opacity: 0.12;
    border-radius: 0 100% 0 100%;
    transform-origin: center;
    animation: fallAndWobble linear forwards;
}

/* Campfire sparks rising up */
.particle.spark {
    background-color: #f97316;
    border-radius: 50%;
    opacity: 0.45;
    box-shadow: 0 0 6px #f97316, 0 0 12px #f59e0b;
    animation: floatUpAndFade linear forwards;
}

/* Floating joint filters / colillas falling down */
.particle.butt {
    background: linear-gradient(180deg, #e5d5be 70%, #d97706 70%); /* Paper color + filter tip */
    border: 0.5px solid rgba(0, 0, 0, 0.15);
    width: 3.5px;
    height: 12px;
    opacity: 0.15;
    border-radius: 1px;
    animation: fallAndWobble linear forwards;
}

@keyframes fallAndWobble {
    0% {
        transform: translateY(-20px) rotate(0deg) translateX(0);
    }
    50% {
        transform: translateY(50vh) rotate(180deg) translateX(var(--drift-mid, 15px));
    }
    100% {
        transform: translateY(105vh) rotate(360deg) translateX(var(--drift-end, 30px));
    }
}

@keyframes floatUpAndFade {
    0% {
        transform: translateY(105vh) translateX(0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(50vh) translateX(var(--drift-mid, -20px)) scale(0.6);
        opacity: 0.4;
    }
    100% {
        transform: translateY(-50px) translateX(var(--drift-end, -40px)) scale(0.1);
        opacity: 0;
    }
}

/* Music Player Widget */
.music-widget {
    border-color: var(--glass-border-green) !important;
}

.player-content {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: rgba(0, 0, 0, 0.2);
}

.track-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.track-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--green-neon);
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.track-artist {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.audio-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: 0.2rem;
}

.player-btn {
    background: var(--green-muted);
    border: 1px solid var(--green-primary);
    color: var(--green-neon);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: var(--transition-smooth);
    box-shadow: 0 0 5px rgba(112, 224, 0, 0.1);
}

.player-btn:hover, .player-btn.active {
    background: var(--green-primary);
    color: var(--bg-dark);
    box-shadow: 0 0 10px var(--green-neon);
}

.wave-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
    width: 48px;
    margin: 0 0.2rem;
}

.wave-visualizer .bar {
    width: 4px;
    height: 3px;
    background-color: var(--green-neon);
    border-radius: 1px;
    transition: height 0.15s ease;
}

.wave-visualizer.playing .bar {
    animation: bounceWave 0.8s ease infinite alternate;
}

.wave-visualizer.playing .bar:nth-child(2) { animation-delay: 0.15s; }
.wave-visualizer.playing .bar:nth-child(3) { animation-delay: 0.3s; }
.wave-visualizer.playing .bar:nth-child(4) { animation-delay: 0.05s; }
.wave-visualizer.playing .bar:nth-child(5) { animation-delay: 0.2s; }

@keyframes bounceWave {
    0% { height: 3px; }
    100% { height: 18px; }
}

#music-volume {
    flex-grow: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    accent-color: var(--green-neon);
    cursor: pointer;
}

/* ==========================================
   SNAPCHAT THC STYLING
   ========================================== */

/* Login Panel */
.snap-login-panel {
    max-width: 480px;
    margin: 2rem auto;
    border-color: var(--glass-border-green) !important;
}

/* Sidebar Streaks */
.user-streaks-widget {
    border-color: var(--glass-border-green) !important;
}

.group-streak-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(249, 115, 22, 0.08);
    border: 1px dashed rgba(249, 115, 22, 0.3);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.05);
}

.group-streak-box .streak-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #f97316;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.group-streak-box .streak-val {
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
}

.sidebar-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.5rem;
}

.user-streaks-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-streak-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.user-streak-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.user-streak-card.active-chat {
    border-color: var(--green-primary);
    background: var(--green-muted);
}

.streak-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.streak-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--green-primary);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 0.68rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.streak-username {
    font-size: 0.78rem;
    font-weight: 500;
}

.streak-counter-pill {
    font-size: 0.72rem;
    font-weight: 600;
    color: #f97316;
}

/* Snap Layout */
.snap-main-panel {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    width: 100%;
}

/* Snap Subtabs Bar */
.snap-tabs-bar {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.25rem;
    gap: 0.25rem;
    margin-bottom: 1.2rem;
}

.snap-tab-btn {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.snap-tab-btn:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.03);
}

.snap-tab-btn.active {
    background: var(--green-primary);
    color: var(--bg-dark);
    box-shadow: 0 0 10px rgba(112, 224, 0, 0.2);
}

/* Stories Circles (Snapchat Bubble List) */
.stories-horizontal-list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.4rem 0.2rem 1rem 0.2rem;
    scrollbar-width: thin;
    scrollbar-color: var(--green-muted) transparent;
}

.stories-horizontal-list::-webkit-scrollbar {
    height: 4px;
}

.stories-horizontal-list::-webkit-scrollbar-thumb {
    background: var(--green-muted);
    border-radius: 2px;
}

.story-circle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

.story-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-dark);
    padding: 3px;
    border: 2px solid var(--green-primary);
    box-shadow: 0 0 10px rgba(112, 224, 0, 0.25);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-circle-wrapper:hover .story-bubble {
    transform: scale(1.08);
    box-shadow: 0 0 15px var(--green-neon);
}

.story-bubble-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green-neon), var(--gold-secondary));
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-circle-label {
    font-size: 0.7rem;
    font-weight: 500;
    max-width: 68px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* Snap Timeline Feed */
.snap-feed-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 0.4rem;
}

.feed-snap-card {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.snap-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.snap-card-author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.snap-card-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gold-primary);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snap-card-username {
    font-size: 0.82rem;
    font-weight: 600;
}

.snap-card-recipient-badge {
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.4rem;
}

.snap-card-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.snap-card-body {
    position: relative;
    width: 100%;
    max-height: 380px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snap-card-body img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
}

.snap-card-caption-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 0.6rem 0.8rem;
    font-size: 0.78rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.snap-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background: rgba(0, 0, 0, 0.1);
}

.snap-card-actions {
    display: flex;
    gap: 0.8rem;
}

.snap-like-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition-smooth);
}

.snap-like-btn:hover {
    color: #ef4444;
}

.snap-like-btn.liked {
    color: #ef4444;
}

/* Camera Card */
.camera-card {
    border-color: var(--glass-border-green) !important;
    padding: 1.2rem;
}

.camera-viewfinder-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.captured-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.viewfinder-overlay {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

.camera-status-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1rem;
}

.file-upload-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 1.2rem 0;
}

.file-upload-divider::before, .file-upload-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.file-upload-divider span {
    padding: 0 0.8rem;
}

.file-upload-box {
    position: relative;
    overflow: hidden;
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Calendar Archive */
.calendar-header-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    margin-bottom: 1.2rem;
}

.calendar-header-controls h4 {
    font-family: var(--font-heading);
    color: var(--green-neon);
    font-size: 1.05rem;
    font-weight: 600;
}

.calendar-grid-container {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0.8rem;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day {
    aspect-ratio: 1/1;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    cursor: default;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.calendar-day.empty-day {
    opacity: 0.2;
    border: none;
    background: transparent;
}

.calendar-day.active-day {
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.calendar-day.has-photo {
    cursor: pointer;
    border-color: var(--glass-border-green);
}

.calendar-day.has-photo:hover {
    transform: scale(1.04);
    border-color: var(--green-neon);
    box-shadow: 0 0 10px rgba(112, 224, 0, 0.15);
    z-index: 2;
}

.calendar-day-num {
    position: absolute;
    top: 3px;
    left: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    z-index: 2;
}

.calendar-day.has-photo .calendar-day-num {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.calendar-day-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.65;
    transition: var(--transition-smooth);
    z-index: 1;
}

.calendar-day:hover .calendar-day-thumb {
    opacity: 0.95;
}

.calendar-day-likes {
    position: absolute;
    bottom: 3px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #ef4444;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 0.05rem 0.25rem;
    border-radius: 4px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 1.5px;
    border: 0.5px solid rgba(239, 68, 68, 0.2);
}

/* Snapchat Story Viewer Modal */
.story-viewer-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: calc(100vh - 120px);
    max-height: 680px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    animation: zoomInModal 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.story-progress-bar-wrapper {
    position: absolute;
    top: 6px;
    left: 8px;
    width: calc(100% - 16px);
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    z-index: 10;
    overflow: hidden;
}

.story-progress-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--green-primary);
    transition: width 0.1s linear;
}

.story-viewer-header {
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    z-index: 9;
}

.story-user-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.story-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--green-primary);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.story-user-details {
    display: flex;
    flex-direction: column;
}

.story-username {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.story-time {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.story-close-btn {
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

.story-close-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.story-viewer-body {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000;
}

.story-viewer-body img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.story-caption-overlay {
    position: absolute;
    bottom: 60px;
    left: 5%;
    width: 90%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.35;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.story-viewer-footer {
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 9;
}

.story-like-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(4px);
    transition: var(--transition-smooth);
}

.story-like-btn:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.story-like-btn.liked {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

/* ==========================================
   TRIVIA THC STYLING
   ========================================== */

/* Trivia Leaderboard Widget */
.trivia-leaderboard-card {
    border-color: var(--glass-border-green) !important;
}

.trivia-leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trivia-leaderboard-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    font-size: 0.78rem;
}

.trivia-leaderboard-item .rank-num {
    font-weight: 700;
    width: 20px;
    color: var(--text-muted);
}

.trivia-leaderboard-item:nth-child(1) .rank-num { color: #ffd700; } /* Gold */
.trivia-leaderboard-item:nth-child(2) .rank-num { color: #c0c0c0; } /* Silver */
.trivia-leaderboard-item:nth-child(3) .rank-num { color: #cd7f32; } /* Bronze */

.trivia-leaderboard-item .player-name {
    flex-grow: 1;
    font-weight: 500;
}

.trivia-leaderboard-item .player-score {
    font-weight: 700;
    color: var(--green-neon);
}

/* Trivia Stats */
.trivia-local-stats {
    border-color: var(--glass-border-green) !important;
}

/* Lobby and panels */
.trivia-lobby-panel {
    text-align: center;
    max-width: 580px;
    margin: 1rem auto;
    padding: 2rem;
    border-color: var(--glass-border-green) !important;
}

.lobby-header-badge {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--green-muted);
    border: 1px solid var(--green-primary);
    margin: 0 auto 1.2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(112, 224, 0, 0.15);
}

.lobby-icon {
    font-size: 1.8rem;
    color: var(--green-neon);
}

/* Active Game Screen */
.trivia-game-panel {
    border-color: var(--glass-border-green) !important;
    padding: 1.5rem;
}

.game-header-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.progress-indicator {
    color: var(--text-muted);
}

.score-display {
    font-family: var(--font-heading);
}

.trivia-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin-top: 0.6rem;
    overflow: hidden;
}

.trivia-progress-fill {
    height: 100%;
    background: var(--green-primary);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px var(--green-neon);
}

/* Timer Bar */
.trivia-timer-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.timer-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.timer-bar-outer {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 2px;
    overflow: hidden;
}

.timer-bar-inner {
    height: 100%;
    background: #22c55e;
    transition: width 0.1s linear, background-color 0.3s ease;
}

/* Question box */
.trivia-question-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 1.2rem;
    border-radius: 8px;
    position: relative;
    text-align: center;
}

.trivia-category-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold-secondary);
    color: var(--bg-dark);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trivia-question-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0.3rem 0;
}

/* Answer Options Grid */
.trivia-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.trivia-option-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trivia-option-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--green-primary);
    box-shadow: 0 0 10px rgba(112, 224, 0, 0.1);
}

.trivia-option-btn.correct {
    background: rgba(34, 197, 94, 0.15) !important;
    border-color: #22c55e !important;
    color: #22c55e !important;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
    animation: correctFlash 0.4s ease;
}

.trivia-option-btn.incorrect {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
    animation: shakeElement 0.4s ease;
}

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

@keyframes shakeElement {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Toast Feedback */
.trivia-feedback-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
    from { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Game Over Summary */
.trivia-summary-panel {
    text-align: center;
    max-width: 500px;
    margin: 1.5rem auto;
    padding: 2rem;
    border-color: var(--glass-border-green) !important;
}

.summary-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(212, 163, 115, 0.08);
    border: 1px solid var(--gold-primary);
    margin: 0 auto 1.2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(212, 163, 115, 0.15);
}

.summary-badge i {
    font-size: 1.5rem;
}

.results-stats-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.result-box {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 1.2rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.res-num {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
}

.res-lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Custom Question Creator */
.trivia-question-creator {
    margin-top: 1.5rem;
}

.trivia-creator-panel {
    max-width: 580px;
    margin: 1.5rem auto;
    border-color: var(--glass-border-green) !important;
}

.create-q-option {
    display: block;
    width: 100%;
}

/* ==========================================
   EMAIL REQUEST TAB STYLING
   ========================================== */
.email-request-card {
    border-color: var(--glass-border-green) !important;
}

.input-suffix-wrapper:focus-within {
    border-color: var(--green-primary) !important;
    box-shadow: 0 0 10px rgba(112, 224, 0, 0.15);
}

.email-notice-box {
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from { transform: scale(0.98); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}



