* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    cursor: none;
}

/* Variables */
:root {
    --primary-color: #00ffff;
    --secondary-color: #ff00ff;
    --background-color: #0a0a0a;
    --text-color: #ffffff;
    --card-bg: #1a1a1a;
    --card-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    --navbar-bg: rgba(10, 10, 10, 0.9);
    --navbar-text: #ffffff;
    --button-hover: #00cccc;
    --link-color: #00ffff;
    --scrollbar-bg: rgba(0, 255, 255, 0.1);
    --scrollbar-thumb: rgba(0, 255, 255, 0.5);
    --scrollbar-thumb-hover: rgba(0, 255, 255, 0.7);
}

/* Dark mode variables */
.dark-mode {
    --primary-color: #ff00ff;
    --secondary-color: #00ffff;
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --card-bg: #2b2b2b;
    --card-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
    --navbar-bg: rgba(26, 26, 26, 0.9);
    --button-hover: #cc00cc;
    --link-color: #ff00ff;
    --scrollbar-bg: rgba(255, 0, 255, 0.1);
    --scrollbar-thumb: rgba(255, 0, 255, 0.5);
    --scrollbar-thumb-hover: rgba(255, 0, 255, 0.7);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

main {
    flex: 1 0 auto;
    padding: 80px 0;
}

footer {
    flex-shrink: 0;
}

/* Section spacing */
.section-block {
    margin-bottom: 4rem;
}

.section-title {
    margin-bottom: 2rem;
}

/* Navbar */
.navbar {
    background: linear-gradient(90deg, rgba(10, 10, 10, 0.9), rgba(26, 26, 26, 0.9));
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.3);
}

.navbar-brand {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--primary-color) !important;
    position: relative;
    overflow: hidden;
}

.navbar-brand::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    z-index: -1;
    filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.navbar-brand:hover::before {
    opacity: 1;
}

.nav-link {
    color: var(--navbar-text) !important;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.nav-link:hover::before {
    transform: translateX(0);
}

/* Buttons */
.btn {
    position: relative;
    padding: 10px 20px;
    border: none;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--background-color);
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    z-index: -1;
    filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover::before {
    opacity: 1;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn:hover::after {
    width: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: none;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 255, 255, 0.3);
}

/* Cyberpunk divider */
.cyberpunk-divider {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    position: relative;
    overflow: hidden;
    transform: perspective(100px) rotateX(5deg);
    box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--secondary-color);
    margin: 2rem 0;
}

.cyberpunk-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--text-color), transparent);
    animation: cyberpunk-divider-pulse 3s linear infinite;
}

@keyframes cyberpunk-divider-pulse {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Custom cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: border-color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
    mix-blend-mode: difference;
    will-change: transform;
}

.custom-cursor::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: background-color 0.3s ease;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#cyber-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.loading-text {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--primary-color);
    font-family: 'Orbitron', sans-serif;
}

/* Interactive CLI */
.interactive-terminal {
    height: 400px;
    background-color: var(--background-color);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    padding: 10px;
    font-family: 'Fira Code', monospace;
    color: var(--primary-color);
    overflow: hidden;
    margin-top: 1rem;
}

#terminal {
    width: 100%;
    height: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .section-block {
        padding: 1rem;
    }

    .interactive-terminal {
        height: 300px;
    }
}

/* Hide elements during loading */
body.loading nav,
body.loading .scrollable-content,
body.loading footer,
body.loading canvas:not(#cyber-scene canvas),
body.loading .cyberpunk-divider {
    display: none !important;
}

/* Neon effect */
.neon {
    color: var(--text-color);
    text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color), 0 0 15px var(--primary-color),
        0 0 20px var(--primary-color), 0 0 35px var(--primary-color), 0 0 40px var(--primary-color),
        0 0 50px var(--primary-color), 0 0 75px var(--primary-color);
}

/* Code blocks */
pre {
    background-color: var(--card-bg);
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

code {
    font-family: 'Fira Code', monospace;
    color: var(--primary-color);
}

/* API Reference styles */
.accordion-item {
    background-color: var(--card-bg);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    margin-bottom: 1rem;
}

.accordion-button {
    background-color: var(--card-bg);
    color: var(--primary-color);
    font-weight: bold;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: var(--background-color);
}

.accordion-body {
    background-color: var(--background-color);
    color: var(--text-color);
}

/* FAQ styles */
#faqAccordion .accordion-item {
    margin-bottom: 1rem;
}

#faqAccordion .accordion-button {
    font-size: 1.1rem;
}

/* Dark mode toggle button */
#darkModeToggle {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

#darkModeToggle:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
}

/* Ensure smooth transition for theme change */
body,
.card,
.accordion-item,
.accordion-button,
.btn,
.custom-cursor {
    transition: all 0.3s ease-in-out;
}

/* Scrollable content */
.scrollable-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - 60px);
    /* Adjust for header height */
    padding-right: 20px;
    /* Add padding to account for the custom scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

/* Hide webkit scrollbar */
.scrollable-content::-webkit-scrollbar {
    display: none;
}

/* Main container */
main.container {
    min-height: 100%;
    padding-bottom: 76px;
    /* Footer height */
}

/* Footer */
footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 76px;
    /* Set a fixed height for the footer */
    background: linear-gradient(90deg, rgba(10, 10, 10, 0.9), rgba(26, 26, 26, 0.9));
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 -2px 10px rgba(0, 255, 255, 0.3);
    transition: opacity 0.3s ease;
    z-index: 1000;
}

/* Ensure the last element in the main content has enough margin to be fully visible */
main.container>*:last-child {
    margin-bottom: 76px;
}

/* 3D Animated Logo */
.logo-container {
    perspective: 1000px;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
}

.logo-3d {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.logo-main {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: visible;
}

.glitch-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('Argonaut-Logo.png') no-repeat center center / contain;
    opacity: 0;
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    z-index: 2;
    opacity: 0.1;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo-container {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .logo-container {
        width: 100px;
        height: 100px;
    }
}

/* Footer Styles */
footer {
    background: linear-gradient(90deg, rgba(10, 10, 10, 0.9), rgba(26, 26, 26, 0.9));
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 -2px 10px rgba(0, 255, 255, 0.3);
    padding: 15px 0;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

footer p {
    margin: 0;
}

footer a {
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease;
}

footer a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

footer a:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Responsive Footer */
@media (max-width: 768px) {
    footer .container {
        flex-direction: column;
        text-align: center;
    }

    footer p,
    footer a {
        font-size: 0.9rem;
        margin: 5px 0;
    }

    footer .col-md-6:last-child {
        margin-top: 10px;
    }
}

/* Ensure the scrollable content has enough padding at the bottom */
.scrollable-content {
    padding-bottom: 76px;
}

/* Dropdown button */
.btn-group .dropdown-toggle {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: var(--background-color);
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 10px 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-group .dropdown-toggle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    z-index: -1;
    filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-group .dropdown-toggle:hover::before {
    opacity: 1;
}

.btn-group .dropdown-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
}

/* Dropdown menu */
.dropdown-menu {
    background: var(--card-bg);
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    padding: 0;
    overflow: hidden;
}

.dropdown-item {
    color: var(--text-color);
    font-family: 'Orbitron', sans-serif;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--background-color);
}

.dropdown-item i {
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.dropdown-item:hover i {
    transform: scale(1.2);
}

/* Add a subtle glow effect to the dropdown */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    z-index: -1;
    filter: blur(5px);
    opacity: 0.5;
}

.glitch {
    position: relative;
    font-size: 5rem;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 0.025em;
    text-shadow:
        0.05em 0 0 rgba(255, 0, 255, 0.75),
        -0.025em -0.05em 0 rgba(0, 255, 255, 0.75),
        0.025em 0.05em 0 rgba(0, 255, 0, 0.75);
    animation: glitch 500ms infinite;
}

.glitch span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch span:first-child {
    animation: glitch 650ms infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-0.025em, -0.0125em);
    opacity: 0.8;
}

.glitch span:last-child {
    animation: glitch 375ms infinite;
    clip-path: polygon(0 80%, 100% 20%, 100% 100%, 0 100%);
    transform: translate(0.0125em, 0.025em);
    opacity: 0.8;
}

@keyframes glitch {
    0% {
        text-shadow:
            0.05em 0 0 rgba(255, 0, 255, 0.75),
            -0.05em -0.025em 0 rgba(0, 255, 255, 0.75),
            -0.025em 0.05em 0 rgba(0, 255, 0, 0.75);
    }

    14% {
        text-shadow:
            0.05em 0 0 rgba(255, 0, 255, 0.75),
            -0.05em -0.025em 0 rgba(0, 255, 255, 0.75),
            -0.025em 0.05em 0 rgba(0, 255, 0, 0.75);
    }

    15% {
        text-shadow:
            -0.05em -0.025em 0 rgba(255, 0, 255, 0.75),
            0.025em 0.025em 0 rgba(0, 255, 255, 0.75),
            -0.05em -0.05em 0 rgba(0, 255, 0, 0.75);
    }

    49% {
        text-shadow:
            -0.05em -0.025em 0 rgba(255, 0, 255, 0.75),
            0.025em 0.025em 0 rgba(0, 255, 255, 0.75),
            -0.05em -0.05em 0 rgba(0, 255, 0, 0.75);
    }

    50% {
        text-shadow:
            0.025em 0.05em 0 rgba(255, 0, 255, 0.75),
            0.05em 0 0 rgba(0, 255, 255, 0.75),
            0 -0.05em 0 rgba(0, 255, 0, 0.75);
    }

    99% {
        text-shadow:
            0.025em 0.05em 0 rgba(255, 0, 255, 0.75),
            0.05em 0 0 rgba(0, 255, 255, 0.75),
            0 -0.05em 0 rgba(0, 255, 0, 0.75);
    }

    100% {
        text-shadow:
            -0.025em 0 0 rgba(255, 0, 255, 0.75),
            -0.025em -0.025em 0 rgba(0, 255, 255, 0.75),
            -0.025em -0.05em 0 rgba(0, 255, 0, 0.75);
    }
}

/* Responsive styles for the glitch effect */
@media (max-width: 768px) {
    .glitch {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .glitch {
        font-size: 2rem;
    }
}

.cyberpunk-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cyberpunk-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    opacity: 0;
    transition: all 0.5s ease;
    z-index: -1;
}

.cyberpunk-card:hover::before {
    top: -50%;
    left: -50%;
    opacity: 0.1;
    transform: rotate(45deg);
}

.cyberpunk-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 255, 255, 0.2);
}

/* Desktop styles (default) */
#home .mt-3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#home .btn-primary {
    margin-bottom: 15px;
    width: auto;
}

#home .button-row {
    display: flex;
    justify-content: center;
    width: 100%;
}

#home .button-row .btn,
#home .button-row .btn-group {
    margin: 0 5px;
}

/* Mobile styles */
@media (max-width: 768px) {
    #home .mt-3 {
        flex-direction: column;
    }

    #home .btn,
    #home .btn-group {
        width: 100%;
        margin: 5px 0;
    }

    #home .button-row {
        flex-direction: column;
    }

    #home .button-row .btn,
    #home .button-row .btn-group {
        margin: 5px 0;
    }

    #home .btn-group .btn {
        border-radius: 5px !important;
    }

    .dropdown-menu {
        width: 100%;
    }
}

.btn {
    white-space: nowrap;
}

/* Add these styles for the custom scrollbar */
.custom-scrollbar-container {
    position: fixed;
    right: 5px;
    top: 0;
    bottom: 0;
    width: 10px;
    z-index: 1000;
}

.custom-scrollbar {
    position: absolute;
    right: 0;
    width: 6px;
    background-color: var(--primary-color);
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.custom-scrollbar:hover {
    width: 10px;
}

/* Adjust the scrollable content to make room for the custom scrollbar */
.scrollable-content {
    padding-right: 20px;
    /* Increase this value if needed */
}

/* Hide the default scrollbar for WebKit browsers */
.scrollable-content::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* Hide the default scrollbar for Firefox */
.scrollable-content {
    scrollbar-width: none;
}

/* Hide the default scrollbar for IE and Edge */
.scrollable-content {
    -ms-overflow-style: none;
}

/* Add new styles for the added features */
.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Enhance the appearance of code blocks */
pre {
    background-color: var(--card-bg);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    position: relative;
}

pre::before {
    content: attr(data-language);
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.25rem 0.5rem;
    background-color: var(--primary-color);
    color: var(--background-color);
    font-size: 0.8rem;
    border-bottom-left-radius: 5px;
}

/* Improve FAQ section styling */
#faqAccordion .accordion-button {
    background-color: var(--card-bg);
    color: var(--primary-color);
    border: none;
}

#faqAccordion .accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: var(--background-color);
}

#faqAccordion .accordion-body {
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Enhance the appearance of the custom scrollbar */
.custom-scrollbar {
    background-color: var(--primary-color);
    opacity: 0.5;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.custom-scrollbar:hover {
    opacity: 1;
    width: 10px;
}

/* Add styles for async support highlight */
.async-support {
    background-color: var(--card-bg);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    padding: 1rem;
    margin-top: 2rem;
}

.async-support h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}
