/* ===== Base Styles ===== */
/* Common styles used across all pages: index.html, faq.html, market-detail.html */

/* ===== Fonts ===== */
@font-face {
    font-family: 'Neue Machina';
    src: url('../fonts/NeueMachina-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Neue Machina';
    src: url('../fonts/NeueMachina-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== No Select ===== */
body {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scrollbar-gutter: stable;
}

body {
    font-family: 'Neue Machina', sans-serif;
    background-color: #050508;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: clip;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== Container ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Mobile screens */
@media (max-width: 600px) {
    .container {
        padding: 0 16px;
    }
}

/* ===== Header ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    height: 104px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 52px;
    height: 52px;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 0 24px rgba(160, 164, 254, 0.6));
}

.logo-text {
    height: 23px;
    width: auto;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-link {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: normal;
    color: #ffffff;
}

.nav-link--disabled {
    color: rgba(255, 255, 255, 0.5);
    cursor: default;
    position: relative;
}

.soon-badge {
    font-family: 'Neue Machina', sans-serif;
    font-weight: 700;
    font-size: 10px;
    line-height: normal;
    color: rgba(160, 164, 254, 0.5);
    position: absolute;
    top: -13px;
    right: -13px;
}

/* X Logo */
.x-link {
    display: block;
}

.x-logo {
    width: 18px;
    height: 17px;
    display: block;
}

/* ===== Scramble Animation ===== */
.scramble-text {
    cursor: pointer;
}

.scramble-wrapper {
    position: relative;
    display: inline-block;
    pointer-events: none;
}

.scramble-base {
    visibility: hidden;
    pointer-events: none;
}

.scramble-char {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    color: transparent;
    -webkit-text-stroke: 0.2px #BDBEDB;
}

/* Disabled link scramble with muted color */
.nav-link--disabled .scramble-char {
    -webkit-text-stroke: 0.2px #BDBEDB;
}

/* ===== Value Change Animations ===== */

/* Value increased - green glow animation */
.value-increased {
    animation: value-increase 1.5s ease-out forwards;
}

@keyframes value-increase {
    0% {
        color: #4ade80;
        text-shadow: 0 0 8px rgba(74, 222, 128, 0.8), 0 0 16px rgba(74, 222, 128, 0.4);
    }
    25% {
        color: #4ade80;
        text-shadow: 0 0 6px rgba(74, 222, 128, 0.5), 0 0 12px rgba(74, 222, 128, 0.25);
    }
    60% {
        color: #4a9a6a;
        text-shadow: 0 0 2px rgba(74, 222, 128, 0.1), 0 0 4px rgba(74, 222, 128, 0.05);
    }
    100% {
        color: #555787;
        text-shadow: 0 0 0 rgba(74, 222, 128, 0), 0 0 0 rgba(74, 222, 128, 0);
    }
}

/* Value decreased - red glow animation */
.value-decreased {
    animation: value-decrease 1.5s ease-out forwards;
}

@keyframes value-decrease {
    0% {
        color: #f87171;
        text-shadow: 0 0 8px rgba(248, 113, 113, 0.8), 0 0 16px rgba(248, 113, 113, 0.4);
    }
    25% {
        color: #f87171;
        text-shadow: 0 0 6px rgba(248, 113, 113, 0.5), 0 0 12px rgba(248, 113, 113, 0.25);
    }
    60% {
        color: #8a6060;
        text-shadow: 0 0 2px rgba(248, 113, 113, 0.1), 0 0 4px rgba(248, 113, 113, 0.05);
    }
    100% {
        color: #555787;
        text-shadow: 0 0 0 rgba(248, 113, 113, 0), 0 0 0 rgba(248, 113, 113, 0);
    }
}

/* ===== Base Tooltips ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background-color: #171825;
    border: 1px solid #252640;
    font-family: 'Neue Machina', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    color: #b9b9b9;
    width: max-content;
    max-width: 280px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Hide empty tooltips */
[data-tooltip=""]:hover::after,
[data-tooltip="-"]:hover::after {
    opacity: 0;
    visibility: hidden;
}

/* ===== Base Skeleton Loading ===== */

/* Skeleton placeholder element */
.skeleton {
    background: linear-gradient(
        90deg,
        #171825 0%,
        #1f2033 50%,
        #171825 100%
    );
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 2px;
}

@keyframes skeleton-pulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes skeletonPulse {
    0%, 100% {
        stroke: #171825;
    }
    50% {
        stroke: #252640;
    }
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== Footer ===== */
.footer {
    width: 100%;
    padding-top: 0px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.footer-logo {
    width: 180px;
    height: auto;
    filter: brightness(0) saturate(100%) invert(5%) sepia(8%) saturate(1200%) hue-rotate(200deg) brightness(95%) contrast(95%);
}

.footer-text {
    font-family: 'Google Sans Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: #606061;
    letter-spacing: 0.05em;
    position: absolute;
    bottom: 30px;
}

.footer-x-link {
    color: #606061;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-x-link:hover {
    color: #7c7ff2;
}

/* ===== Responsive - Small screens (600px) ===== */
@media (max-width: 600px) {
    /* Header gets its own padding, expands to full width */
    .header {
        padding-top: 20px;
        height: 80px;
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        display: none;
    }

    .nav {
        gap: 20px;
    }

    .nav-link {
        font-size: 14px;
    }

    .soon-badge {
        font-size: 9px;
        top: -10px;
        right: -10px;
    }

    .footer-logo {
        width: 140px;
    }

    .footer-text {
        font-size: 12px;
        bottom: 24px;
    }
}

/* ===== Responsive - Mobile (480px) ===== */
@media (max-width: 480px) {
    .header {
        padding-top: 16px;
        height: 72px;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .nav {
        gap: 14px;
    }

    .nav-link {
        font-size: 13px;
    }

    .footer-logo {
        width: 120px;
    }

    .footer-text {
        font-size: 11px;
        bottom: 20px;
    }
}
