:root {
    --bg-dark: #0a0a0f;
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #ec4899;
    --secondary-glow: rgba(236, 72, 153, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
    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;
}

/* Background Animations */
.mesh-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.15) 0px, transparent 50%);
    z-index: -2;
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 300px; height: 300px;
    background: var(--primary-glow);
    top: 10%; left: 10%;
}

.orb-2 {
    width: 400px; height: 400px;
    background: var(--secondary-glow);
    bottom: 10%; right: 10%;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Typography */
h1, h2, h3 { font-family: var(--font-heading); }
.text-gradient {
    background: linear-gradient(135deg, #818cf8, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism Utilities */
.glass-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.glass-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.1);
    border-color: rgba(255,255,255,0.15);
}

/* Buttons */
button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    outline: none;
}

.glass-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 8px;
    gap: 0.3rem;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.primary-btn:hover {
    box-shadow: 0 6px 20px var(--secondary-glow);
    background: linear-gradient(135deg, #818cf8, #f472b6);
}

/* Nav Links */
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    background: rgba(255,255,255,0.03);
    padding: 0.4rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.user-profile {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.nav-btn {
    background: transparent;
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
}

.nav-btn:hover, .nav-btn.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

/* Tab Slider */
.tab-slider-container {
    display: flex;
    background: rgba(255,255,255,0.05);
    border-radius: 100px;
    padding: 0.3rem;
    margin: 0 auto 2rem auto;
    max-width: 400px;
    border: 1px solid var(--glass-border);
}

.tab-btn {
    flex: 1;
    background: transparent;
    color: var(--text-muted);
    padding: 0.8rem 1rem;
    border-radius: 100px;
    font-weight: bold;
    transition: all 0.3s;
    text-align: center;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Main Layout */
.main-content {
    padding: 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.view-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.view-section.active {
    display: block;
}

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

/* Community Dashboard */
.hero-section {
    padding: 4rem 0;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

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

.search-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    border-radius: 100px;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    outline: none;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

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

.avatar-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    margin: 0 auto 1rem;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-dark);
}

/* Tree View */
.tree-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.badge {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.right-controls {
    display: flex;
    gap: 1rem;
}

.tree-canvas-wrapper {
    width: 100%;
    height: 600px;
    position: relative;
    overflow: hidden;
    cursor: grab;
}

.tree-canvas-wrapper:active {
    cursor: grabbing;
}

/* D3 SVG Styles */
.node circle {
    fill: var(--bg-dark);
    stroke: var(--primary);
    stroke-width: 3px;
    transition: fill 0.3s, stroke 0.3s, transform 0.3s;
}

.node:hover circle {
    fill: var(--primary);
    stroke: #fff;
    transform: scale(1.1);
}

.node text {
    font-family: var(--font-body);
    font-size: 14px;
    fill: var(--text-main);
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.link {
    fill: none;
    stroke: var(--glass-border);
    stroke-width: 2px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.glass-modal {
    background: rgba(15, 15, 20, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.3s;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.show .glass-modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-btn {
    background: transparent;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.close-btn:hover {
    color: white;
}

.input-group {
    margin-bottom: 1.2rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.input-group input, .input-group select {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    color: white;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus, .input-group select:focus {
    border-color: var(--primary);
}

.w-full { width: 100%; justify-content: center; }
.mt-4 { margin-top: 1rem; }
.mt-2 { margin-top: 0.5rem; }

/* Auth Pages */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    z-index: 10;
}
.auth-box {
    transform: none !important; /* Override modal transform */
}
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-8 { margin-bottom: 2rem; }
.pb-8 { padding-bottom: 2rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pb-2 { padding-bottom: 0.5rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.justify-center { justify-content: center; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-4 { gap: 1rem; }
.border-b { border-bottom: 1px solid var(--glass-border); }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.max-w-4xl { max-width: 896px; }
.max-w-2xl { max-width: 672px; }
.p-10 { padding: 2.5rem; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }
.space-y-4 > * + * { margin-top: 1rem; }
.font-heading { font-family: var(--font-heading); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* Bento List View for Requests */
.list-bento {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1.5rem;
    align-items: center;
}
.list-bento-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .glass-nav {
        flex-direction: column;
        justify-content: center;
        gap: 1rem;
        padding: 1rem;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    .user-profile {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .list-bento {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    .list-bento > div:first-child {
        margin: 0 auto;
    }
    .list-bento-actions {
        justify-content: center;
        margin-top: 0.5rem;
    }
}

/* ==================================================
   ANTI-GOOGLE TRANSLATE UI OVERRIDES
   Completely hides the top banner, hover tooltips, 
   and "Suggest better translation" popups.
   ================================================== */

/* Hide the top banner frame */
iframe.goog-te-banner-frame {
    display: none !important;
}

/* Prevent Google Translate from shifting the body down */
body {
    top: 0px !important;
    position: relative !important;
}

/* Hide the hover tooltip popup ("Contribute a better translation") */
#goog-gt-tt, .goog-te-balloon-frame {
    display: none !important;
}

/* Disable the text highlight when hovering over translated text */
.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Hide any unexpected generic google elements */
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf-ti6hGc {
    display: none !important;
}
