:root {
    --primary-color: #fd4d0d;
    --background-color: #020617;
    --foreground-color: #f4f4f6;
    --text-color: #94a3b8;
    --container-width: 1024px;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif
}

/* Header */
.site-header {
    background-color: var(--background-color);
    margin-bottom: 1rem;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    min-width: 0;
    flex: 0 1 auto;
}

.brand-name {
    color: var(--foreground-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-links-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: end;
    margin-right: 2rem
}

.nav-list {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0
}

.nav-item {
    position: relative
}

.nav-button {
    background: #fff0;
    border: none;
    font-size: 1rem;
    font-family: inherit
}

.nav-button::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease
}

.nav-item:hover .nav-button::after {
    transform: rotate(-135deg)
}

.nav-link,
.nav-button {
    display: flex;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0;
    cursor: pointer
}

.nav-link:hover {
    color: var(--primary-color)
}

.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    background: var(--background-color);
    box-shadow: 0 5px 42px 0 #00000014;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(10px);
    transition: all 0.2s cubic-bezier(.4, 0, .2, 1);
    list-style: none;
    min-width: 220px;
    margin-top: 1rem;
    padding: 10px;
    z-index: 999;
}

.submenu::before {
    content: '';
    position: absolute;
    top: -1rem;
    width: 100%;
    height: 1rem
}

.nav-item:hover .submenu,
.nav-item:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0)
}

.submenu-link {
    color: var(--text-color);
    padding: .4rem .6rem;
    display: block;
    font-weight: 500;
    text-decoration: none
}

.submenu-link:hover {
    color: var(--primary-color)
}

.nav-button-group {
    order: 3
}

.cta-button {
    padding: .5rem 1.25rem;
    font-weight: 500;
    font-size: .9rem;
    border-radius: .5rem;
    text-decoration: none;
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 1px 2px 0 rgb(37 99 235 / .3)
}

.menu-toggle {
    display: none;
    width: 32px;
    height: 32px;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
}

.menu-toggle .icon-bar {
    width: 20px;
    height: 2px;
    background-color: var(--text-color);
    position: relative
}

.menu-toggle .icon-bar::before,
.menu-toggle .icon-bar::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background-color: var(--text-color);
}

.menu-toggle .icon-bar::before {
    top: -6px
}

.menu-toggle .icon-bar::after {
    top: 6px
}

@media (max-width:768px) {
    .nav-container {
        justify-content: space-between;
        gap: .5rem;
    }

    .nav-button-group {
        display: flex;
        align-items: center;
        gap: .5rem
    }

    .menu-toggle {
        display: flex;
        justify-content: flex-end;
    }

    .nav-links-wrapper {
        position: fixed;
        top: 0;
        right: 0;
        height: 100%;
        width: 300px;
        margin: 0;
        background: var(--background-color);
        transform: translateX(300px);
        transition: transform 0.3s ease
    }

    .nav-links-wrapper.is-open {
        transform: translateX(0)
    }

    .site-header::before {
        content: "";
        position: fixed;
        inset: 0;
        background-color: #fff0;
        backdrop-filter: blur(0);
        pointer-events: none;
        transition: background-color 0.3s ease, backdrop-filter 0.3s ease
    }

    .site-header:has(.nav-links-wrapper.is-open)::before {
        background-color: rgba(0, 0, 0, .2);
        backdrop-filter: blur(5px);
    }

    body:has(.nav-links-wrapper.is-open) {
        overflow: hidden
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        padding: 0;
        gap: .75rem
    }

    .nav-item {
        padding: .5rem .5rem .5rem 2rem;
    }

    .nav-list::before {
        content: "NAVIGATION";
        letter-spacing: 5px;
        font-weight: 700;
        background: var(--foreground-color);
        text-align: center;
        padding: 2rem 0;
        color: #6b7280;
    }

    .submenu {
        margin-top: 0;
    }

    .site-header::before,
    .nav-links-wrapper {
        z-index: 999;
    }
}

/* PWA & iOS Toast */
.ios-pwa-toast {
    position: fixed;
    bottom: -110%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 25px;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transition: bottom 0.5s cubic-bezier(0.32, 1, 0.23, 1);
    text-align: center;
}

.ios-pwa-toast.active {
    bottom: 0;
}

.toast-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    transition: 0.3s;
}

.toast-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ios-icon {
    height: 24px;
    vertical-align: middle;
    margin: 0 4px;
}

body.toast-open {
    overflow: hidden;
}

#pwa-install-btn {
    cursor: pointer;
    border: none;
}



/* Footer Container */
.site-footer {
    background-color: var(--background-color);
    border-top: 1px solid #e5e7eb;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.footer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.copyright {
    color: var(--text-color);
    font-size: 0.875rem;
}

.copyright-brand {
    font-weight: 500;
    text-decoration: none;
}

.footer-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.5rem;
}

.footer-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.2s;
    display: inline-block;
    padding: 0.5rem 0;
}

.footer-nav a:hover {
    color: var(--primary-color);
}

@media (max-width:768px) {
    .footer-content {
        flex-direction: column-reverse;
    }

    .footer-nav {
        justify-content: center;
    }

    .copyright {
        margin-bottom: .5rem;
    }
}

/*FPS Test CSS*/
body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

.mono {
	font-family: 'ui-monospace', 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
}

.grid-bg {
	background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
	background-size: 30px 30px;
}

::-webkit-scrollbar {
	width: 6px;
}

::-webkit-scrollbar-track {
	background: #020617;
}

::-webkit-scrollbar-thumb {
	background: #1e293b;
	border-radius: 10px;
}

.glow-text {
	text-shadow: 0 0 30px rgba(6, 182, 212, 0.5);
}

.card-glass {
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.stress-controls-wrapper {
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	max-width: 0;
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
	display: flex;
	align-items: center;
}

.stress-active .stress-controls-wrapper {
	max-width: 600px;
	opacity: 1;
	pointer-events: auto;
	margin-left: 1.5rem;
}

#graph-tooltip {
	position: absolute;
	pointer-events: none;
	background: rgba(15, 23, 42, 0.98);
	border: 1px solid rgba(34, 211, 238, 0.4);
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 11px;
	font-weight: 800;
	color: #fff;
	display: none;
	z-index: 100;
	transform: translate(-50%, -130%);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}
