/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    /* --- NEW GREEN THEME PALETTE --- */

    /* Backgrounds: Shifted from Blue-Black to Deep Green-Black */
    --bg-dark: #ffffff;
    --bg-gradient: radial-gradient(circle at 50% 0%, #fcfdfc, #f5f7f6 80%);
    --logo-color: #278f29;
    --black-color: #000000;
    --white-color: #ffffff;

    /* Brand Colors (Matching your Logo) */
    --neon-cyan: #00e676;
    /* Main Brand Green (Bright) */
    --neon-purple: #00c853;
    /* Secondary Green (Darker/Richer) */

    --text-main: #1a1a1a;
    --text-muted: #6b8273;
    /* Slightly green-tinted grey for harmony */
    --alert-red: #ff4757;

    /* Glass Effects (Light Theme with Dark Borders) */
    --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(240, 255, 245, 0.5) 100%);

    /* Changed from green (0, 230, 118) to black (0, 0, 0) with transparency */
    --glass-border: rgba(0, 0, 0, 0.2);
    --glass-border-top: rgba(0, 0, 0, 0.4);

    --glass-blur: 20px;

    /* Utilities */
    --ease-smooth: all 0.3s ease;
    --shadow-glow: 0 0 20px rgba(0, 230, 118, 0.15);
    /* Green Glow */
}

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

/* Accessibility: Keyboard focus state */
*:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 3px;
}

body {
    background-color: var(--bg-dark);
    background-image: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    width: 100%;
    display: block;
    /* Optional: helps with spacing on some pages */
    position: relative;
}

/* Shared Glass Utility */
.glass-base {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}


/* =========================================
   3. LAYOUT & PANELS
   ========================================= */
.container {
    max-width: 90%;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.glass-panel {
    background: var(--logo-color);
    border: 2px solid var(--black-color);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;

    /* Removed border-width from transition, added outline */
    transition: outline 0.3s ease, box-shadow 0.3s ease;

    /* Set a transparent outline normally so it has something to animate from */
    outline: 0px solid transparent;
}

.glass-panel:hover {
    /* Instead of making the border thicker, we add a 2px outline on the outside */
    /* 2px border + 2px outline = 4px visual thickness! */
    outline: 0px solid var(--black-color);

    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.15);
}

/* =========================================
   4. TABS & FILTERS (Gradient Mask)
   ========================================= */

.controls-section {
    margin-bottom: 0.5rem;
}

.category-scroll a:nth-child(3) {
    margin-right: 120px;
    /* space after ALL/ANSWERED/UNANSWERED */
}

/* Container for the scrolling tabs */
.category-scroll {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 5px;
    margin: 0 auto;
    width: fit-content;
    max-width: 100%;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

/* =====================================================
   1. BASE (ALL PILLS)
   ===================================================== */
.tech-pill {
    text-decoration: none;
    padding: 6px 18px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    transition: 0.25s ease;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #d7d7d7;
}

/* =====================================================
   2. BASE :hover (ALL PILLS)
   ===================================================== */
.tech-pill:hover {
    background: rgba(0, 0, 0, 0.65);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 255, 128, 0.25);
}

/* =====================================================
   3. ACTIVE (ALL PILLS)
   ===================================================== */
.tech-pill.active {
    background: #00ff80;
    border-color: #00ff80;
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 18px rgba(0, 255, 128, 0.55);
}

/* =====================================================
   4. ACTIVE :hover (ALL PILLS)
   ===================================================== */
.tech-pill.active:hover {
    box-shadow: 0 0 24px rgba(0, 255, 128, 0.75);
}

/* =====================================================
   5. NOT ANSWERED / NOT UNANSWERED (CATEGORY PILLS)
   ===================================================== */
.tech-pill:not([href*="answered"]):not([href*="unanswered"]):not([href*="all"]) {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 255, 128, 0.30);
    color: #00ff80;
    box-shadow: 0 0 4px rgba(0, 255, 128, 0.20);
}

/* =====================================================
   6. NOT ANSWERED / NOT UNANSWERED :hover
   ===================================================== */
.tech-pill:not([href*="answered"]):not([href*="unanswered"]):not([href*="all"]):hover {
    background: rgba(0, 0, 0, 0.65);
    border-color: #00ff80;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(0, 255, 128, 0.35);
}

/* =====================================================
   7. ACTIVE + NOT ANSWERED/UNANSWERED
   ===================================================== */
.tech-pill.active:not([href*="answered"]):not([href*="unanswered"]):not([href*="all"]) {
    background: rgba(0, 255, 128, 0.18);
    border-color: #00ff80;
    color: #00ff80;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(0, 255, 128, 0.45);
}

/* =====================================================
   8. ACTIVE + NOT ANSWERED/UNANSWERED :hover
   ===================================================== */
.tech-pill.active:not([href*="answered"]):not([href*="unanswered"]):not([href*="all"]):hover {
    box-shadow: 0 0 22px rgba(0, 255, 128, 0.65);
}

/* DEFAULT (non-active) style — ANSWERED / UNANSWERED / ALL */
.tech-pill[href*="answered"],
.tech-pill[href*="unanswered"],
.tech-pill[href*="all"] {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 255, 128, 0.30);
    color: #00ff80;
    box-shadow: 0 0 4px rgba(0, 255, 128, 0.20);
}

/* HOVER */
.tech-pill[href*="answered"]:hover,
.tech-pill[href*="unanswered"]:hover,
.tech-pill[href*="all"]:hover {
    background: rgba(0, 0, 0, 0.65);
    border-color: #00ff80;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(0, 255, 128, 0.35);
}

/* ACTIVE + SECOND-ACTIVE (FINAL NEON LOOK) */
.tech-pill.active[href*="answered"],
.tech-pill.active[href*="unanswered"],
.tech-pill.active[href*="all"],
.tech-pill.second-active {
    background: #00ff80;
    border-color: #00ff80;
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 18px rgba(0, 255, 128, 0.55);
}

.status-right-container {
    margin-left: auto;
    display: flex;
    align-items: center;
}

/* =========================================
   5. AUTO-RESPONSIVE GRID & CARDS
   ========================================= */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 10px;
    transition: transform 0.1s ease-out;
    will-change: transform;
    perspective: 1000px;
    transform-style: preserve-3d;
    cursor: pointer;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    /* Green tint gradient */
    background: linear-gradient(135deg,
            rgba(0, 230, 118, 0.05) 0%,
            rgba(0, 0, 0, 0) 40%);
    z-index: 1;
    pointer-events: none;
}

.card-title {
    font-size: 1rem;
    color: #fff;
    margin: 0 5px 5px 5px;
    line-height: 1.3;
    font-weight: 600;
}

.card-desc {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    color: var(--white-color);
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    transition: color 0.3s ease;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 2px solid var(--black-color);
    margin-top: 10px;
    width: 100%;
}

.stat {
    font-size: 0.75rem;
    color: var(--white-color);
    white-space: nowrap;
    margin-right: auto;
}

/* Card Buttons (Vote, etc) */
.btn-glow {
    /* Gradient: Bright Green -> Deep Green */
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    color: #000;
    /* Black text for readability on green */
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.3);
    transition: var(--ease-smooth);
    font-size: 0.9rem;
}

.btn-glow:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 230, 118, 0.5);
}

/* =========================================
   FLOATING ACTION BUTTON (Black Text Version)
   ========================================= */

.fab-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;

    /* Sizing */
    height: 50px;
    padding: 0 24px;
    border-radius: 50px;

    /* Green Gradient Background */
    background: var(--logo-color);

    /* --- TEXT COLOR CHANGED BACK TO BLACK --- */
    color: var(--white-color);
    /* ---------------------------------------- */

    /* Typography */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    /* Made slightly bolder for impact */
    text-decoration: none;

    /* Layout */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    /* Effects */
    box-shadow: 0 5px 20px var(--logo-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
}

/* 1. Icon Animation (Spin) */
.fab-btn i {
    font-size: 1.1rem;
    transition: transform 0.4s ease;
    /* Icon inherits black color automatically */
}

.fab-btn:hover i {
    transform: rotate(90deg);
}

/* 2. Button Animation (Lift & Glow) */
.fab-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 30px var(--logo-color);
    filter: brightness(1.05);
}

/* Container to hold Category and View Details side-by-side */
.card-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 12px;
}

/* Reset margin for the category text so it aligns perfectly */
.card-meta .card-desc {
    margin: 0;
}

/* Style for the View Details Link */
.view-details-link {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    color: var(--white-color);
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    transition: color 0.3s ease;
}

/* Hover Effect */
.view-details-link:hover {
    color: #00ff99;
    /* Neon Green */
}

/* Mobile Adjustment */
@media (max-width: 480px) {
    .fab-btn {
        bottom: 20px;
        right: 20px;
        height: 45px;
        padding: 0 18px;
        font-size: 0.75rem;
    }
}

/* =========================================
   6. VOTE & RADIO BUTTONS (Green Update)
   ========================================= */
.vote-option input[type="radio"]:checked {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.vote-option input[type="radio"]:checked::after {
    background-color: var(--neon-cyan);
}

.btn-vote {
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-vote:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.5);
    transform: scale(1.05);
}

/* =========================================
   7. RESPONSIVE ADJUSTMENTS
   ========================================= */
@media (hover: hover) {
    body {
        background-attachment: fixed;
    }
}