/* ==========================================================================
   MAIN LAYOUT & TYPOGRAPHY STYLES
   ========================================================================== */

html, body {
    overflow: hidden !important;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    height: 100vh;
    height: 100dvh;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Montserrat', 'Arial Black', 'Arial Bold', sans-serif;
    font-weight: 900;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 1.2s ease, color 1.2s ease;
    perspective: 1000px;
}

body.ui-hover {
    cursor: default !important;
}

body.fever-shake {
    animation: screen-shake 0.08s infinite alternate;
}

@keyframes screen-shake {
    0% { transform: translate(-3px, 2px) rotate(-0.5deg); }
    100% { transform: translate(3px, -2px) rotate(0.5deg); }
}

/* Viewport Border Frame */
.viewport-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9000;
    box-sizing: border-box;
    border: 2px solid var(--viewport-border);
    transition: border-color 1.2s ease;
}

/* Progress SVG Timer */
.viewport-progress-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9001;
}

.viewport-progress-path {
    fill: none;
    stroke: var(--progress-color);
    stroke-width: 6;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke 1.2s ease;
}

/* Main Container & Hero Logo */
.main-container {
    text-align: center;
    pointer-events: none;
    width: 90%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.2rem;
    padding: 20px;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

.logo-img {
    width: 100%;
    max-width: 680px;
    height: auto;
    filter: drop-shadow(0 0 20px var(--logo-drop-shadow));
    transition: filter 1.2s ease, opacity 0.3s ease;
    transform: translateZ(30px);
}

.tagline {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    line-height: 1.3;
    color: var(--text-color);
    max-width: 550px;
    text-align: center;
    text-wrap: balance;
    text-shadow: 0 0 20px var(--tagline-shadow);
    transition: color 1.2s ease, text-shadow 1.2s ease;
    transform: translateZ(20px);
    will-change: transform, opacity;
}

.tagline.snappy-in {
    animation: slideInRight 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateZ(20px) translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateZ(20px) translateX(0);
    }
}

.tagline.blast-active {
    animation: tagline-pulse 0.4s infinite alternate;
}

@keyframes tagline-pulse {
    0% { transform: translateZ(20px) scale(1.1); }
    100% { transform: translateZ(20px) scale(1.2); }
}

.cta-button {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 28px;
    border: 2px solid transparent;
    border-radius: 30px;
    /* Rainbow gradient border via the "double background" trick: an inner
       solid layer (clipped to the padding box) sits over an outer gradient
       layer (clipped to the border box), so the border itself reads as a
       thin ring of color instead of a flat line. */
    background-image: linear-gradient(var(--bg-color), var(--bg-color)),
        linear-gradient(90deg, #FF0055, #9900FF, #00E5FF, #FFB300, #FF0055);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.25em;
    color: var(--text-color);
    text-transform: uppercase;
    opacity: 0.9;
    cursor: pointer;
    pointer-events: auto;
    transition: color 1.2s ease, opacity 0.3s ease-in-out, transform 0.15s ease, background-image 1.2s ease;
    transform: translateZ(10px);
    animation: pulse-subtle 3s infinite ease-in-out;
}

.cta-button:hover {
    opacity: 1;
    transform: translateZ(10px) scale(1.03);
}

/* Animated "fill" behind the icon/text — grows in on hover with a flowing
   rainbow gradient, recedes back to nothing on mouse-out. */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, #FF0055, #9900FF, #00E5FF, #FFB300, #FF0055);
    background-size: 300% 100%;
    opacity: 0.4;
    z-index: 1;
    pointer-events: none;
    transition: width 0.45s ease;
}

.cta-button:hover::before {
    width: 100%;
    animation: cta-fill-flow 2.4s linear infinite;
}

@keyframes cta-fill-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: -300% 50%; }
}

.cta-icon {
    position: relative;
    z-index: 2;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.cta-button #cta-text {
    position: relative;
    z-index: 2;
}

@keyframes pulse-subtle {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.03); opacity: 0.95; }
}

/* Mobile Breakpoints */
@media (max-width: 600px) {
    body { cursor: auto; }
    .main-container { gap: 1.8rem; transform: none !important; }
    .tagline { font-size: 1.2rem; max-width: 90%; }
    .cta-button { font-size: 0.78rem; padding: 10px 24px; letter-spacing: 0.2em; gap: 8px; }
    .cta-icon { width: 13px; height: 13px; }
}

@media (pointer: coarse) {
    body { cursor: auto; }
    .main-container { transform: none !important; }
}
