html {
    height: 100%;
}

@import url('https://fonts.googleapis.com/css2?family=Funnel+Sans:ital,wght@0,300..800;1,300..800&family=Geist+Mono:wght@100..900&display=swap');

body {
    margin: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

canvas {
    width: 100%;
    height: 100%;
}

#dataViz {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

/* Visualization Display Styles */
.bottom-left {
    position: fixed;
    bottom: 10px;
    left: 20px;
    color: white;
    display: flex;
}

.bottom-right {
    position: fixed;
    bottom: 0;
    right: 0;
    pointer-events: none;
}

.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

#arrayShape {
    color: white;
    text-decoration: none;
    font-family: 'Geist Mono', monospace;
    background: rgba(0, 255, 0, 0.12);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 14px;
}

.distribution {
    right: 0;
    margin: 0;
    height: 180px;
    width: 270px;
    pointer-events: auto;
}

.query-container {
    align-self: center;
    margin-bottom: 10px;
    background: rgba(0, 255, 0, 0.12);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 4px;
    width: 200px;
    padding: 10px 20px;
    color: white;
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    pointer-events: auto;
}

.slice-container,
.equality-container {
    display: flex;
    font-weight: 400;
}

.x-equals {
    margin: auto;
    white-space: nowrap;
}

#equalityQuery {
    margin: 5px 0 5px 4px;
    width: 100%;
}

.inequality-container {
    display: flex;
}

#greaterThanQuery,
#lessThanQuery {
    width: 100%;
    margin: 5px 0;
    flex: 1;
}

#xSliceQuery,
#ySliceQuery,
#zSliceQuery {
    width: 100%;
    margin: 5px 0;
    flex: 2;
}

#xSliceQuery,
#ySliceQuery {
    margin: 5px 5px;
}

#zSliceQuery {
    margin: 5px 0 5px 5px;
}

.equality-container label,
.inequality-container label,
.slice-container label {
    word-spacing: -0.3em;
}

.x-inequality {
    margin: auto 5px auto 7px;
    white-space: nowrap;
}

input {
    color: white;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
}

/* Main GUI Styles */
#gui {
    display: flex;
    flex-direction: column;
    padding: 2em 3em;
    margin: auto;
    font-family: 'Funnel Sans', sans-serif;
    max-width: 1200px;
    overflow-y: visible;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 2em 0 1em;
    margin-bottom: 2em;
    position: relative;
}

.main-title {
    font-family: 'Funnel Sans', sans-serif;
    font-size: 4em;
    margin: 0;
    color: #00ff00;
    text-shadow: 0 0 30px rgba(0, 255, 0, 0.6);
    font-weight: 700;
    letter-spacing: -2px;
}

.tagline {
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.8);
    margin: 0.5em 0 0;
    font-weight: 300;
}

#title-underline-canvas {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 8px; /* Set a default height */
    z-index: 1; /* Ensure it's above other elements if needed */
}


#border {
    width: 100%;
    margin: 2em 0;
}

#borderCanvas {
    display: block;
    width: 100%;
    height: 8px;
}


/* Input Section */
.input-section {
    margin-bottom: 3em;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
}

.section-title {
    font-size: 2em;
    color: #00ff00;
    margin: 0;
    font-weight: 600;
}

.supported {
    text-align: right;
    padding: 5px 15px;
    color: rgba(0, 255, 0, 0.6);
    font-size: 0.9em;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 4px;
    font-family: 'Geist Mono', monospace;
}

#arrayInput {
    resize: none;
    margin-bottom: 1.5em;
    height: 48vh;
    width: 100%;
    font-family: 'Geist Mono', monospace;
    font-weight: 500;
    border-radius: 8px;
    padding: 15px;
    background: rgba(0, 255, 0, 0.03);
    border: 2px solid rgba(0, 255, 0, 0.3);
    color: #00ff00;
    font-size: 0.95em;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#arrayInput:focus {
    outline: none;
    border-color: #00ff00;
    background: rgba(0, 255, 0, 0.08);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

#arrayInput::placeholder {
    color: rgba(0, 255, 0, 0.3);
}

#runViz {
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
    color: #000;
    cursor: pointer;
    font-family: 'Funnel Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    padding: 15px 40px;
    text-align: center;
    transform: translateY(0);
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

#runViz:hover {
    box-shadow: 0 6px 25px rgba(0, 255, 0, 0.5);
    transform: translateY(-3px);
}

.button-arrow {
    font-size: 1.3em;
    transition: transform 0.3s ease;
}

#runViz:hover .button-arrow {
    transform: translateX(5px);
}

.github-button-container {
    text-align: center;
    margin-top: 3em;
}

.github-link-alt {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 8px;
    color: #00ff00;
    text-decoration: none;
    font-family: 'Funnel Sans', sans-serif;
    font-size: 1em;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.github-link-alt:hover {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00ff00;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.2);
    transform: translateY(-2px);
}

.github-link-alt .github-icon {
    width: 20px;
    height: 20px;
    filter: invert(1);
}

/* Features Section */
.features-section {
    margin: 4em 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
    margin-top: 2em;
}

.feature-item {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 12px;
    padding: 2em;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00ff00;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 0, 0.2);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 0.5em;
}

.feature-item h3 {
    color: #00ff00;
    font-size: 1.4em;
    margin: 0.5em 0;
    font-weight: 600;
}

.feature-item p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

/* Use Cases Section */
.use-cases-section {
    margin: 4em 0;
    padding: 3em;
    background: rgba(0, 255, 0, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 0, 0.2);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2em;
    margin-top: 2em;
}

.use-case {
    padding: 1.5em;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 0, 0.2);
    transition: all 0.3s ease;
}

.use-case:hover {
    background: rgba(0, 255, 0, 0.08);
    border-color: #00ff00;
}

.use-case h3 {
    color: #00ff00;
    font-size: 1.3em;
    margin: 0 0 0.5em 0;
    font-weight: 600;
}

.use-case p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

/* How It Works Section */
.how-it-works-section {
    margin: 4em 0;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2em;
    margin-top: 2em;
}

.step {
    text-align: center;
    padding: 2em;
    background: rgba(0, 255, 0, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 0, 0.3);
    transition: all 0.3s ease;
}

.step:hover {
    background: rgba(0, 255, 0, 0.1);
    transform: translateY(-5px);
}

.step-number {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
    color: #000;
    font-size: 2em;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 1em;
}

.step h3 {
    color: #00ff00;
    font-size: 1.5em;
    margin: 0.5em 0;
    font-weight: 600;
}

.step p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

/* Footer Navigation */
.footer-nav {
    margin-top: 4em;
    padding-top: 2em;
    padding-bottom: 2em;
    /* border-top: 2px solid rgba(0, 255, 0, 0.3); */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2em;
}

.footer-links {
    display: flex;
    gap: 2em;
    flex-wrap: wrap;
    align-items: center;
    margin-top: auto;
}

.footer-links a {
    color: #00ff00;
    text-decoration: none;
    font-size: 1em;
    transition: all 0.3s ease;
    padding: 0.5em 1em;
    border-radius: 4px;
}

.footer-links a:hover {
    background: rgba(0, 255, 0, 0.1);
    text-decoration: underline;
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5em;
    border: 1px solid rgba(0, 255, 0, 0.3);
    padding: 0.5em 1em !important;
}

.github-link:hover {
    border-color: #00ff00;
}

.github-icon {
    width: 20px;
    height: 20px;
    filter: invert(1);
}

.footer-support {
    text-align: right;
}

.footer-support p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 0.5em 0;
    font-size: 0.9em;
}

.donate-link {
    color: #00ff00;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5em 1.5em 0.5em 1.2em;
    border: 1px solid #00ff00;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s ease;
}

.donate-link:hover {
    background: #00ff00;
    color: #000;
}

.min-donate-link-container {
    height: fit-content;
    margin-top: auto;
    pointer-events: none;
}

.min-donate-link-container a {
    pointer-events: auto;
    color: #00ff00;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    font-size: 12px;
    transition: all 0.3s ease;
    font-family: 'Geist Mono', monospace;
    margin: 1em 0;
}
.min-donate-link-container a:hover {
    text-decoration: underline;
}

/* Cookie Consent Banner */
#cookieConsentBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    border-top: 2px solid #00ff00;
    color: white;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 1000;
    font-family: 'Funnel Sans', sans-serif;
}

#cookieConsentBanner p {
    margin: 0 0 15px 0;
}

#cookieConsentBanner button {
    background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
    color: #000;
    padding: 10px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1em;
    transition: all 0.3s ease;
}

#cookieConsentBanner button:hover {
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.4);
    transform: translateY(-2px);
}

.privacy-policy-link {
    color: #00ff00;
    text-decoration: underline;
}

.use-case-header,
.feature-icon {
    color: rgba(0,255,0,1)
}

.uc-icon {
    margin-bottom: 1.5em;
}

.use-case-header > svg,
.feature-icon > svg {
    width: 48px;
    height: 48px;
}

.multiply {
    margin: 0 2px;
}

.red {
    color: rgb(255,0,0)
}
.blue {
    color: rgb(0,0,255);
}
.green {
    color: rgb(0,255,0);
}

/* Visibility States */
#gui,
.inequality-container,
.equality-container {
    display: none;
}

/* Responsive Design */
@media only screen and (max-width: 768px) {
    #gui {
        padding: 1.5em;
    }

    .hero-section {
        padding: 1em 0 1em;
    }

    .use-cases-section {
        padding: 1.5em;
    }

    .main-title {
        font-size: 2.5em;
    }

    .tagline {
        font-size: 1.1em;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5em;
    }

    .features-grid,
    .use-cases-grid,
    .steps-container {
        grid-template-columns: 1fr;
    }

    .footer-nav {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1em;
    }

    .footer-support {
        text-align: center;
    }

    #arrayInput {
        height: 42vh;
    }
}

@media only screen and (max-width: 519px) {
    .min-donate-link-container {
        display: none;
    }
}

@media only screen and (max-width: 480px) {
    .main-title {
        font-size: 2.5em;
    }

    .section-title {
        font-size: 1.5em;
    }

    #runViz {
        width: 100%;
        justify-content: center;
    }
}