@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;400;500;600;700;800;900&family=Noto+Sans:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

body {
    font-family: "Public Sans", "Noto Sans", sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #0032A0;
    /* Primary */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #004ec2;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Utilities */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(to right, #0032A0, #3b82f6);
}

.shadow-glow {
    box-shadow: 0 0 15px rgba(0, 50, 160, 0.5);
}

.shadow-glow-lg {
    box-shadow: 0 0 30px rgba(0, 50, 160, 0.6);
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-outlined.fill {
    font-variation-settings: 'FILL' 1;
}

@keyframes dynamicFusion {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

.footer-fusion-tanks {
    background: linear-gradient(135deg, #0032a0 0%, #05080f 50%, #c5a065 100%);
    background-size: 200% 200%;
    animation: dynamicFusion 12s ease infinite;
    position: relative;
}

.footer-fusion-tanks::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 15, 0.85);
    z-index: 0;
}

.footer-fusion-tanks>div {
    position: relative;
    z-index: 10;
}

.footer-fusion-border-tanks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #0032a0 0%, #05080f 50%, #c5a065 100%);
    background-size: 200% 100%;
    animation: dynamicFusion 12s ease infinite;
    z-index: 50;
}

.header-fusion-border-tanks {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #0032a0 0%, #05080f 50%, #c5a065 100%);
    background-size: 200% 100%;
    animation: dynamicFusion 12s ease infinite;
    z-index: 50;
}

.footer-fusion-casa {
    background: linear-gradient(135deg, #ffffff 0%, #fdfbf7 50%, #c5a065 100%);
    background-size: 200% 200%;
    animation: dynamicFusion 10s ease infinite;
    position: relative;
}

.footer-fusion-casa::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.60);
    z-index: 0;
}

.footer-fusion-casa>div {
    position: relative;
    z-index: 10;
}

.footer-fusion-border-casa {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #ffffff 0%, #fdfbf7 50%, #c5a065 100%);
    background-size: 200% 100%;
    animation: dynamicFusion 10s ease infinite;
    z-index: 50;
}

/* Topbar Global Styles */
.topbar-global {
    width: 100%;
    background-color: rgba(10, 15, 24, 0.95);
    backdrop-filter: blur(12px);
    color: white;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    z-index: 80;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.topbar-container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: opacity 0.2s;
}

.topbar-brand:hover {
    opacity: 0.8;
}

.topbar-logo {
    height: 2rem;
    width: auto;
    filter: invert(1) brightness(2);
}

.topbar-titles {
    display: flex;
    flex-direction: column;
    line-height: 1;
    text-align: left;
}

.topbar-subtitle {
    font-family: serif;
    font-style: italic;
    font-size: 10px;
    color: #94a3b8;
    line-height: 1.25;
}

.topbar-title {
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: white;
}

.topbar-utils {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.util-btn {
    color: #94a3b8;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Needed for tooltip positioning */
}

.util-btn:hover {
    color: white;
}

/* ── Tooltip System ─────────────────────────────────────── */
/* Arrow pointer */
.util-btn[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border: 5px solid transparent;
    border-bottom-color: rgba(15, 23, 42, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transition-delay: 0s;
    z-index: 9999;
}

/* Text box */
.util-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -42px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(15, 23, 42, 0.95);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transition-delay: 0s;
    z-index: 9999;
}

/* On hover: show with delay */
.util-btn[data-tooltip]:hover::before,
.util-btn[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    transition-delay: 0.6s;
}

/* ── Social Button Tooltip (points UP) ──────────────────── */
.social-btn {
    position: relative;
}

/* Arrow pointer (above icon) */
.social-btn[data-tooltip]::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    border: 5px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transition-delay: 0s;
    z-index: 9999;
}

/* Text box (above icon) */
.social-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(15, 23, 42, 0.95);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transition-delay: 0s;
    z-index: 9999;
}

/* On hover: show with delay */
.social-btn[data-tooltip]:hover::before,
.social-btn[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    transition-delay: 0.6s;
}

.util-divider {
    width: 1px;
    height: 1rem;
    background-color: rgba(148, 163, 184, 0.4);
    margin: 0 0.25rem;
}

/* ── Mobile: compact header buttons ─────────────────────── */
@media (max-width: 767px) {
    .topbar-utils {
        gap: 0.35rem !important;
    }

    .util-divider {
        margin: 0;
    }
}

/* Language Responsive Display */
.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-full {
    display: none;
    /* Hidden on mobile */
}

@media (min-width: 1024px) {
    .lang-full {
        display: inline;
        /* Visible on desktop */
    }
}

@media (min-width: 768px) {
    .util-divider {
        display: block;
    }
}

.topbar-cta {
    border: 1px solid #0032A0;
    color: #0032A0;
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.2s;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
    display: none;
}

@media (min-width: 768px) {
    .topbar-cta {
        display: block;
    }
}

.topbar-cta:hover {
    background-color: #0032A0;
    color: white;
}

/* Sidebar Menu Styles */
.menu-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #d1d5db;
    font-weight: 700;
    font-size: 1rem;
    text-transform: capitalize;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: color 0.2s;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-right: 3rem;
}

.menu-parent:hover {
    color: #0032A0;
}

.menu-parent .chevron {
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.menu-parent.active .chevron {
    transform: rotate(180deg);
}

.menu-child {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #9ca3af;
    transition: all 0.2s;
    padding-left: 2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    margin-left: 0.25rem;
}

.menu-child:hover {
    color: #0032A0;
    border-left-color: #0032A0;
}

.menu-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s;
    overflow: hidden;
}

.menu-content.open {
    grid-template-rows: 1fr;
}

.menu-inner {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.menu-parent-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    color: #334155;
    font-family: serif;
    font-weight: 700;
    font-size: 1.125rem;
    text-transform: capitalize;
    letter-spacing: 0.025em;
    cursor: pointer;
    transition: color 0.2s;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.menu-parent-right:hover {
    color: #c5a065;
}

.menu-parent-right .chevron-right {
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.menu-parent-right.active .chevron-right {
    transform: rotate(180deg);
}

.menu-child-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    color: #64748b;
    transition: all 0.2s;
    border-right: 2px solid #e2e8f0;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    padding-right: 0.75rem;
    width: 100%;
}

.menu-child-right:hover {
    color: #c5a065;
    border-right-color: #c5a065;
}

.menu-divider,
.menu-divider-right {
    display: none;
    height: 1px;
    background-color: rgba(209, 213, 219, 0.55);
    margin: 2px 0;
}

.menu-sep,
.menu-sep-right {
    flex: 1;
    height: 1px;
    background-color: rgba(209, 213, 219, 0.5);
    align-self: center;
    margin: 0 4px;
}

.menu-sep-right {
    background-color: #475569;
    margin: 0 8px;
}


/* Theme Toggle Animation */
@keyframes sun-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.theme-toggle .material-symbols-outlined {
    animation: sun-spin 10s linear infinite;
    display: inline-block;
    transform-origin: center;
}

/* Real Sound Waves Animation (Targeting SVG paths) */
@keyframes wave-outward {
    0% {
        opacity: 0;
        transform: scale(0.8) translateX(-1px);
    }

    50% {
        opacity: 1;
        transform: scale(1) translateX(0);
    }

    100% {
        opacity: 0;
        transform: scale(1.3) translateX(3px);
    }
}

.bg-music-toggle.playing .sound-wave {
    animation: wave-outward 2.0s infinite ease-out;
    transform-origin: 10px 12px;
    /* Set origin at speaker mouth */
}

.bg-music-toggle.playing .wave-delay-1 {
    animation-delay: 0s;
}

.bg-music-toggle.playing .wave-delay-2 {
    animation-delay: 0.1s;
}

.bg-music-toggle.playing .material-symbols-outlined {
    color: white;
}

/* Search Panning Animation (No zoom, no glow) */
@keyframes search-panning {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(3px, 3px);
    }

    50% {
        transform: translate(-3px, 0);
    }

    75% {
        transform: translate(0, -3px);
    }

    100% {
        transform: translate(0, 0);
    }
}

.search-toggle .material-symbols-outlined {
    animation: search-panning 5s ease-in-out infinite;
    display: inline-block;
}

/* Custom utilities for the split effect */
.clip-diagonal-left {
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
}

.clip-diagonal-right {
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
}

@media (max-width: 768px) {

    .clip-diagonal-left,
    .clip-diagonal-right {
        clip-path: none;
    }
}

.text-shadow-strong {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.bg-grain {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

/* Sidebar Animations */
#left-sidebar {
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#left-sidebar.open {
    transform: translateX(0);
}

#right-sidebar {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#right-sidebar.open {
    transform: translateX(0);
}

.overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Left overlay: cool deep blue */
#left-overlay {
    background: rgba(0, 20, 60, 0.58) !important;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* Right overlay: warm amber gold */
#right-overlay {
    background: rgba(90, 50, 0, 0.52) !important;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.azimuth-indicator {
    position: absolute;
    right: 0px;
    top: 0;
    bottom: 0px;
    width: 50px;
    height: 100%;
    pointer-events: none;
    z-index: 60;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    font-family: 'Share Tech Mono', monospace;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, black, black);
    mask-image: linear-gradient(to bottom, black, black);
}

.azimuth-scale {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    transition: none;
    margin-right: 5px;
    padding: 0;
}

.azimuth-tick {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(0, 243, 255, 0.4);
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.azimuth-tick.major {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.azimuth-tick .line {
    width: 8px;
    height: 1px;
    background: currentColor;
}

.azimuth-tick.major .line {
    width: 12px;
    height: 0.5px;
}

.azimuth-tick .number {
    font-size: 8px;
    color: rgba(0, 243, 255, 0.6);
}

.azimuth-tick.major .number {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
}

.azimuth-pointer {
    position: absolute;
    right: 0;
    top: 0;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 12px solid #ff0000;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8));
    z-index: 100;
    pointer-events: none;
    opacity: 1;
    transition: none;
    animation: tacticalPulse 0.8s infinite ease-in-out;
}

@keyframes tacticalPulse {
    0% {
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.9));
    }

    50% {
        opacity: 0.6;
        filter: drop-shadow(0 0 4px rgba(255, 0, 0, 0.4));
    }

    100% {
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.9));
    }
}

.footer-fusion {
    background: linear-gradient(135deg, #0032a0 0%, #05080f 50%, #c5a065 100%);
    background-size: 200% 200%;
    animation: dynamicFusion 12s ease infinite;
    position: relative;
}

.footer-fusion::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 15, 0.85);
    z-index: 0;
}

.footer-fusion>div {
    position: relative;
    z-index: 10;
}

.header-fusion-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #0032a0 0%, #05080f 50%, #c5a065 100%);
    background-size: 200% 100%;
    animation: dynamicFusion 12s ease-in-out infinite;
    z-index: 50;
}

.footer-fusion-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #0032a0 0%, #05080f 50%, #c5a065 100%);
    background-size: 200% 100%;
    animation: dynamicFusion 12s ease-in-out infinite;
    z-index: 50;
}

@keyframes text-fusion-breathing {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}


.animate-text-fusion {
    display: inline-block;
    background-size: 250% auto;
    animation: text-fusion-breathing 12s ease-in-out infinite;
}

/* Leaderboard Section Styles */
.metallic-gradient {
    background: linear-gradient(135deg, #f0f1f5 0%, #ffffff 50%, #dadee7 100%);
}

.text-glow-gradient {
    background: linear-gradient(90deg, #00329e, #2563eb, #00329e);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine-glow 3s linear infinite;
}


@keyframes shine-glow {
    to {
        background-position: 200% center;
    }
}

.tech-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 50, 158, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.dark .tech-card {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.05);
}