/* START OF FILE style.css */

/* Basic Reset and Variables */
:root {
    --header-height: 65px; /* Ensure this matches body padding-top */
    --glow-color: rgba(0, 220, 220, 0.7);
    --active-glow-color: rgba(255, 255, 255, 0.8);
    --base-bg-color: #030308; /* Dark base color */
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* *** CRITICAL FIX: Ensure padding-top matches header height exactly *** */
    padding-top: var(--header-height);
    min-height: 100vh;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e8e8e8;
    background-color: var(--base-bg-color); /* Base background color */
    overflow-x: hidden; /* Prevent horizontal scroll from large gradient */
    display: flex;
    flex-direction: column;
}

/* --- NEW Animated Radial Gradient Background --- */
body::before {
    content: "";
    position: fixed;
    inset: 0; /* top, left, right, bottom = 0 */
    z-index: -2; /* Behind noise and content */

    /* Layered Radial Gradients */
    background:
        /* Blob 1 (Cyan-ish, starts somewhat top-left within the large canvas) */
        radial-gradient(circle at 25% 30%, hsla(180, 70%, 50%, 0.4) 0%, transparent 35%),
        /* Blob 2 (Purple-ish, starts somewhat bottom-right within the large canvas) */
        radial-gradient(circle at 75% 70%, hsla(270, 60%, 40%, 0.5) 0%, transparent 40%),
        /* Blob 3 (Optional: Soft Blue-ish, starts center-ish) */
        radial-gradient(circle at 50% 50%, hsla(220, 60%, 50%, 0.25) 0%, transparent 30%);
        /* Add/remove/adjust gradients as desired */

    /* Make the background canvas much larger than the viewport */
    background-size: 300% 300%; /* Adjust size for desired effect (larger = slower feel) */

    /* Let body's base background show through */
    background-color: transparent;

    /* Apply the animation */
    animation: animatedGradientBlobs 35s ease infinite; /* Adjust duration/timing */
}

/* --- Body Noise Overlay (Unchanged) --- */
body::after {
    content: "";
    position: fixed;
    inset: 0; /* Use inset for cleaner top/left/right/bottom: 0 */
    z-index: -1; /* Behind content, above gradient */
    filter: url(#grainyNoise);
    opacity: 0.25; /* Keep body noise level */
    pointer-events: none;
}

/* --- NEW Keyframes for Gradient Animation --- */
/* This replaces the old softBlobBG animation */
@keyframes animatedGradientBlobs {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 0%; /* Move diagonally */
    }
    50% {
        background-position: 100% 100%; /* Move diagonally */
    }
    75% {
         background-position: 0% 100%; /* Move diagonally */
    }
    100% {
        background-position: 0% 50%; /* Return towards start */
    }
}


/* --- Header (Fixed Position and Noise - Unchanged) --- */
.site-header {
    position: fixed; /* Ensure header stays fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height); /* Use the variable */
    z-index: 100;
    padding: 0 1.5rem;
    background-color: rgba(5, 5, 15, 0.3);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Header noise positioned absolutely within */
}

.site-header::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    height: 58px; /* Adjust to match header height */
    z-index: -1;
    filter: url(#grainyNoise);
    opacity: 0.5; /* Keep higher header noise */
    pointer-events: none;
    mix-blend-mode: overlay;
}


.header-content {
    display: flex;
    /* --- CHANGE: Center content horizontally --- */
    justify-content: center;
    /* --- END CHANGE --- */
    align-items: center;
    height: 100%;
    max-width: 1200px; /* Keep max-width if you want bounds */
    margin: 0 auto;
    padding: 0 1.5rem; /* Add padding if needed with centering */
}

/* Restore the logo placeholder rule */
.logo-placeholder {
    height: calc(var(--header-height) * 0.6);
    display: flex;
    align-items: center;
}

.logo-placeholder img {
    display: block;
    max-height: 100%;
    width: auto;
    filter: drop-shadow(0 0 12px var(--glow-color)) drop-shadow(0 0 15px var(--glow-color));
}

.main-container {
    flex-grow: 1;
    width: 100%;
    max-width: 950px;
    margin: 1.5rem auto 3rem auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

#main-title {
    text-align: center;
    font-size: 4.5rem;
    font-weight: 700;
    margin: 2.5rem 0 3.5rem 0;
    font-family: 'Yeseva One', cursive;
    color: transparent;              /* change for hollow effect */
    -webkit-text-stroke: 1px #fff;    /* adds hollow outline */
    text-shadow: 0 0 10px var(--glow-color),
                 0 0 20px var(--glow-color),
                 0 0 35px rgba(0, 220, 220, 0.5);
}

.categories-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0;
    cursor: pointer;
    color: #c8c8ff;
    font-size: 1.35rem;
    font-weight: 500;
    transition: color 0.3s ease;
    width: fit-content;
}

.category-header:hover span:first-child {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.category-header.active span:first-child {
    color: #fff;
    text-shadow: 0 0 10px var(--active-glow-color);
}

.toggle-icon {
    font-size: 1.5rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), color 0.3s ease;
}

.category-header:hover .toggle-icon {
    color: #fff;
}

.category-header.active .toggle-icon {
    transform: rotate(135deg);
    color: #fff;
}

.table-container {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease-out 0.1s, margin-top 0.6s ease-out;
    margin-top: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background-color: rgba(10, 10, 25, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-x: auto;
}

.table-container.visible {
    max-height: 1000px; /* Adjust if tables can be very long */
    opacity: 1;
    margin-top: 0.6rem;
}

.ai-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: #e8e8e8;
    font-size: 1rem;
}

/* Combined styles for table cells */
.ai-table th,
.ai-table td {
    padding: 1rem 1.2rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

/* Specific styles for table header cells */
.ai-table thead th {
    background-color: rgba(255, 255, 255, 0.06);
    font-weight: 600;
    color: #fff;
}

.ai-table tbody tr:last-child td {
    border-bottom: none;
}

.ai-table tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.04);
}

.ai-table th:nth-child(1), .ai-table td:nth-child(1) { width: 8%; text-align: center; } /* No. */
.ai-table th:nth-child(2), .ai-table td:nth-child(2) { width: 45%; } /* Model Name */
.ai-table th:nth-child(3), .ai-table td:nth-child(3) { width: 22%; } /* Cost */
.ai-table th:nth-child(4), .ai-table td:nth-child(4) { width: 25%; text-align: center;} /* Action */

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 7px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    white-space: nowrap;
}

.action-button:hover {
    background-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.site-footer {
    text-align: center;
    padding: 1.8rem 1rem;
    margin-top: auto;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(5, 5, 15, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    z-index: 1;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.site-footer a:hover {
    color: #fff;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
    text-decoration: underline;
}

.header-content {
    display: flex;
    /* --- CHANGE: Center content horizontally --- */
    justify-content: center;
    /* --- END CHANGE --- */
    align-items: center;
    height: 100%;
    max-width: 1200px; /* Keep max-width if you want bounds */
    margin: 0 auto;
    padding: 0 1.5rem; /* Add padding if needed with centering */
}


/* --- Animated/Conditional View All Button --- */
.view-all-button {
    display: block; /* Keep as block for layout */
    width: fit-content;
    /* Remove static margins initially, will be added on visible state */
    margin: 0 0 0 0; /* T R B L - No margin */
    /* Remove vertical padding initially */
    padding: 0 1.2rem; /* Keep L/R padding */
    background-color: rgba(255, 255, 255, 0.08);
    color: #c8c8ff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 7px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;

    /* --- Visibility & Transition Control --- */
    opacity: 0;
    max-height: 0;       /* Collapse the height */
    overflow: hidden;
    pointer-events: none; /* Disable clicks when hidden */
    box-shadow: none;     /* Remove shadow when hidden */
    transform: translateY(0); /* Reset any transform */

    /* Define transitions - Match timings with table container */
    transition: opacity 0.4s ease-out 0.1s,
                max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                margin-top 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                margin-bottom 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                padding-top 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                padding-bottom 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                background-color 0.3s ease,
                color 0.3s ease,
                box-shadow 0.3s ease,
                transform 0.2s ease;
}

/* --- NEW RULE: Show button when the PRECEDING table container is visible --- */
.table-container.visible + .view-all-button {
    opacity: 1;
    max-height: 100px;      /* Allow space for the button */
    pointer-events: auto;  /* Enable clicks */
    /* Add desired spacing when visible */
    margin-top: 1rem;
    margin-bottom: 0.5rem; /* Add some space below the button */
    /* Restore vertical padding */
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

/* --- Keep Hover Styles --- */
.view-all-button:hover {
    background-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px); /* Keep hover effect */
}

.category-table-wrapper {
    /* Copy VISUAL styles from .table-container */
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background-color: rgba(10, 10, 25, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-x: auto; /* Allow horizontal scroll within table */
    /* Add some default margin */
    margin-top: 1rem;
    margin-bottom: 1rem;
    /* Ensure it's visible by default (unlike .table-container) */
    opacity: 1;
    max-height: none; /* No height restriction */
}
