/*
HabitUp Cyberpunk/Futuristic Shared Styles
Author: Gemini (Corrected Version)
Version: 5.0
*/

/* 1. Root Variables & Base Setup */
:root {
    --dark-bg: #03001C;
    --primary-blue: #0A84FF;       /* A brighter, more energetic blue */
    --glow-blue: #30f2f2;         /* Cyan glow for highlights */
    --primary-red: #FF3B30;
    --glow-red: #ff305a;
    --text-white: #FFFFFF;
    --text-light: #EAEAEA;
    --text-dark: #A0A0A0;
    --glass-bg: rgba(10, 20, 40, 0.6);
    --glass-border: rgba(48, 128, 255, 0.25);

    --font-primary: 'Inter', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

body {
    font-family: var(--font-primary);
    background-color: var(--dark-bg);
    color: var(--text-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll aused by some glowing elements */
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}


/* 2. Header & Layout */
.header-glass {
    background: rgba(3, 0, 28, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 40; 
    padding: 0.75rem 2rem;
    width: 100%;
    box-sizing: border-box;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.header-nav a {
    margin-left: 1rem;
}

/* 3. Buttons */
.btn-futuristic {
    position: relative; border: 1px solid rgba(255,255,255,0.2); 
    background: rgba(255,255,255,0.05); color: #fff;
    padding: 0.6rem 1.2rem; border-radius: 8px; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px;
}

.btn-futuristic:hover {
    background: rgba(48,128,255,0.2);
    border-color: var(--glow-blue);
    box-shadow: 0 0 15px rgba(48,128,255,0.3);
}

.btn-futuristic.btn-danger {
    color: var(--glow-red);
}
.btn-futuristic.btn-danger::before { background-color: var(--glow-red); }
.btn-futuristic.btn-danger::after { border-color: var(--glow-red); }
.btn-futuristic.btn-danger:hover, .btn-futuristic.btn-danger:focus {
    text-shadow: 0 0 10px var(--glow-red), 0 0 20px var(--glow-red);
}

/* 4. Cards & Modals */
.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
}

dialog::backdrop {
    background-color: rgba(3, 0, 28, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 5. Form Elements */
.form-input, .form-select {
    font-family: 'Roboto Mono', monospace;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--primary-blue);
    box-shadow: inset 0 0 10px rgba(1, 33, 105, 0.7);
    color: var(--text-light);
    caret-color: var(--glow-red);
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--glow-blue);
    box-shadow: 0 0 15px var(--glow-blue);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-light);
}

/* 6. Typography & Effects */
.neon-glow-blue {
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px var(--glow-blue),
        0 0 40px var(--glow-blue),
        0 0 80px var(--primary-blue),
        0 0 90px var(--primary-blue);
}

.neon-glow-red {
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px var(--glow-red),
        0 0 40px var(--glow-red),
        0 0 80px var(--primary-red),
        0 0 90px var(--primary-red);
}

/* 7. Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* 8. Infographic & Tooltip Fixes */
.arch-card {
    position: relative; /* Establishes a stacking context for z-index */
    transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0s 0.3s; /* Delay z-index change */
    will-change: transform, box-shadow; /* Performance hint for browser */
    z-index: 1;
}

/* On hover, bring the card forward and allow overflow for the tooltip */
.arch-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 50px var(--glow-blue);
    z-index: 20; /* Bring to front */
    overflow: visible; /* IMPORTANT: Allows tooltip to show outside the card bounds */
    transition-delay: 0s; /* Apply z-index change immediately on hover */
}

/* Performance hint for elements animated by AOS library */
[data-aos] {
    will-change: transform, opacity;
}


/* 9. Mobile Responsiveness for Infographic */
@media (max-width: 1024px) {
    /* On tablets, simplify the connecting lines */
    .arch-line {
        display: none;
    }
    #tech-architecture .grid-cols-3 {
        grid-template-columns: 1fr; /* Stack all items */
    }
     #tech-architecture .col-span-1, #tech-architecture .col-span-2, #tech-architecture .col-span-3 {
        grid-column: 1 / -1; /* Make all items full width */
    }
}

@media (max-width: 768px) {
    /* Further adjustments for smaller mobile screens if needed */
    .hero-section h1 {
        font-size: 2.5rem; /* Adjust hero text for readability */
    }
     .feature-card {
        padding: 1rem; /* Reduce padding on smaller cards */
    }
}
