/* ===============================================
   SPA BASE STYLES & VIEW MANAGEMENT
   =============================================== */

:root {
    /* Dynamic color that changes based on gyro/mouse - default to red */
    --dynamic-color: 255, 23, 0;
}

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

body {
    background: #000;
    color: #fff;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    overflow: hidden;
    overscroll-behavior: none;
    position: fixed;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Neon border around viewport edges - ONLY visible during intro screen */
#intro.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
    /* Thick solid border with bright glow - same style as ASCII box */
    border: 2px solid rgb(var(--dynamic-color));
    box-shadow:
        /* Inner glow */
        inset 0 0 10px rgba(var(--dynamic-color), 0.4),
        inset 0 0 20px rgba(var(--dynamic-color), 0.2),
        /* Outer bright glow */
        0 0 10px rgba(var(--dynamic-color), 0.8),
        0 0 20px rgba(var(--dynamic-color), 0.6),
        0 0 40px rgba(var(--dynamic-color), 0.4),
        0 0 60px rgba(var(--dynamic-color), 0.3);
}

/* View Management - Core SPA functionality */
.view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.view.active {
    opacity: 1;
    pointer-events: all;
}

/* Feed view needs scroll */
#feedView {
    overflow: hidden;
}

/* Audio and Contact views need scroll */
#audioView,
#contactView {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
#audioView::-webkit-scrollbar,
#contactView::-webkit-scrollbar {
    display: none;
}

#audioView,
#contactView {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===============================================
   INTRO (from feed.css)
   =============================================== */

.intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.intro.active {
    opacity: 1;
    pointer-events: all;
}

.intro-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Mobile Enter Site Screen */
.mobile-enter-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 2rem;
}

.mobile-enter-screen.hidden {
    display: none;
}

/* First time user: full screen overlay */
.mobile-enter-screen.first-time {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin-top: 0;
    z-index: 10;
    padding: 2rem;
}

.mobile-enter-btn {
    padding: 1.2rem 3.5rem;
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 0.15em;
    background: rgba(var(--dynamic-color), 0.1);
    border: 2px solid rgb(var(--dynamic-color));
    color: rgb(var(--dynamic-color));
    cursor: pointer;
    transition: transform 0.2s ease;
    text-shadow: 0 0 10px rgba(var(--dynamic-color), 0.5);
    box-shadow:
        inset 0 0 10px rgba(var(--dynamic-color), 0.2),
        0 0 15px rgba(var(--dynamic-color), 0.4),
        0 0 30px rgba(var(--dynamic-color), 0.2);
}

.mobile-enter-btn:hover,
.mobile-enter-btn:active {
    background: rgba(var(--dynamic-color), 0.2);
    box-shadow:
        inset 0 0 15px rgba(var(--dynamic-color), 0.3),
        0 0 20px rgba(var(--dynamic-color), 0.6),
        0 0 40px rgba(var(--dynamic-color), 0.4);
    transform: scale(1.05);
}

.intro-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.ascii-box {
    /* Start with no box - just transparent wrapper */
    background: transparent;
    border: 1px solid transparent;
    padding: 1.5rem;
    box-shadow: none;
    transition: all 0.8s ease;
    animation: none;
    display: inline-block;
}

.ascii-box.show-box {
    background: rgba(0, 0, 0, 1.0);
    border-color: rgb(var(--dynamic-color));
    box-shadow:
        inset 0 0 30px rgba(var(--dynamic-color), 0.15),
        inset 0 0 60px rgba(var(--dynamic-color), 0.08),
        0 0 20px rgba(var(--dynamic-color), 0.4),
        0 0 40px rgba(var(--dynamic-color), 0.3),
        0 0 60px rgba(var(--dynamic-color), 0.2),
        0 0 80px rgba(var(--dynamic-color), 0.1),
        0 0 100px rgba(var(--dynamic-color), 0.05);
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow:
            inset 0 0 30px rgba(var(--dynamic-color), 0.15),
            inset 0 0 60px rgba(var(--dynamic-color), 0.08),
            0 0 20px rgba(var(--dynamic-color), 0.4),
            0 0 40px rgba(var(--dynamic-color), 0.3),
            0 0 60px rgba(var(--dynamic-color), 0.2),
            0 0 80px rgba(var(--dynamic-color), 0.1),
            0 0 100px rgba(var(--dynamic-color), 0.05);
    }
    50% {
        box-shadow:
            inset 0 0 35px rgba(var(--dynamic-color), 0.2),
            inset 0 0 70px rgba(var(--dynamic-color), 0.1),
            0 0 25px rgba(var(--dynamic-color), 0.5),
            0 0 50px rgba(var(--dynamic-color), 0.4),
            0 0 75px rgba(var(--dynamic-color), 0.25),
            0 0 100px rgba(var(--dynamic-color), 0.15),
            0 0 125px rgba(var(--dynamic-color), 0.08);
    }
}

.ascii-art {
    font-family: monospace;
    font-size: 3px;
    line-height: 1.0;
    color: rgb(var(--dynamic-color));
    text-shadow: 0 0 10px rgb(var(--dynamic-color));
    margin: 0;
    white-space: pre;
    display: block;
    /* Fixed width prevents shifting as text types - matches longest line */
    width: 290px;
    height: 210px;
    text-align: left;
}

.start-button {
    padding: 1rem 3rem;
    font-size: 1.0rem;
    font-weight: 700;
    color: rgb(var(--dynamic-color));
    background: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    animation: fadeInButton 0.5s ease forwards;
    border: 2px solid rgb(var(--dynamic-color));
    -webkit-tap-highlight-color: transparent;
    box-shadow:
        0 0 10px rgba(var(--dynamic-color), 0.3),
        0 0 20px rgba(var(--dynamic-color), 0.2);
    text-shadow: 0 0 5px rgba(var(--dynamic-color), 0.8);
}

.start-button.hidden {
    display: none;
}

.start-button:hover {
    background: rgb(var(--dynamic-color));
    color: #000;
    box-shadow:
        0 0 20px rgba(var(--dynamic-color), 0.6),
        0 0 40px rgba(var(--dynamic-color), 0.4),
        0 0 60px rgba(var(--dynamic-color), 0.2);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.start-button:active {
    transform: scale(0.98);
}

@keyframes fadeInButton {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Name Entry Keyboard - iOS Style */
.name-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    animation: fadeInEntry 0.6s ease forwards;
    max-width: 90vw;
}

.name-entry.hidden {
    display: none;
}

@keyframes fadeInEntry {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.name-entry-title {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: rgb(var(--dynamic-color));
    letter-spacing: 0.2em;
    text-shadow:
        0 0 10px rgba(var(--dynamic-color), 0.8),
        0 0 20px rgba(var(--dynamic-color), 0.5),
        0 0 30px rgba(var(--dynamic-color), 0.3);
    margin: 0;
}

.name-display {
    font-family: 'Courier New', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: rgb(var(--dynamic-color));
    letter-spacing: 0.15em;
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid rgb(var(--dynamic-color));
    text-shadow: 0 0 10px rgba(var(--dynamic-color), 0.6);
    min-width: 250px;
    text-align: center;
}

.name-display .cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* iOS-style keyboard layout */
.letter-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    width: 100%;
    max-width: 500px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

/* Row 1: QWERTYUIOP - 10 keys */
.keyboard-row-1 {
    gap: 6px;
}

/* Row 2: ASDFGHJKL - 9 keys, slightly indented */
.keyboard-row-2 {
    gap: 6px;
}

/* Row 3: SHIFT + letters + DEL */
.keyboard-row-3 {
    gap: 6px;
}

/* Row 4: 123, SPACE, OK */
.keyboard-row-4 {
    gap: 6px;
}

.letter-cell {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgb(var(--dynamic-color));
    background: rgba(var(--dynamic-color), 0.05);
    border: 1px solid rgba(var(--dynamic-color), 0.3);
    border-radius: 6px;
    min-width: 42px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
    text-shadow: 0 0 5px rgba(var(--dynamic-color), 0.5);
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.letter-cell:hover {
    background: rgba(var(--dynamic-color), 0.15);
    border-color: rgb(var(--dynamic-color));
    box-shadow:
        0 0 8px rgba(var(--dynamic-color), 0.3),
        0 0 15px rgba(var(--dynamic-color), 0.15);
    text-shadow: 0 0 8px rgba(var(--dynamic-color), 0.8);
}

.letter-cell:active {
    background: rgb(var(--dynamic-color));
    color: #000;
    transform: scale(0.95);
    text-shadow: none;
}

/* Special keys styling */
.letter-cell.special-key {
    font-size: 0.9rem;
    min-width: 65px;
}

.letter-cell.shift-key,
.letter-cell.delete-key {
    font-size: 1.3rem;
    min-width: 60px;
}

.letter-cell.shift-key.active {
    background: rgba(var(--dynamic-color), 0.2);
    border-color: rgb(var(--dynamic-color));
}

.letter-cell.space-key {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.letter-cell.toggle-key {
    min-width: 50px;
}

.letter-cell.ok-key {
    background: rgba(var(--dynamic-color), 0.15);
    border-color: rgb(var(--dynamic-color));
    min-width: 80px;
}

.letter-cell.ok-key:hover {
    background: rgb(var(--dynamic-color));
    color: #000;
    box-shadow:
        0 0 15px rgba(var(--dynamic-color), 0.6),
        0 0 30px rgba(var(--dynamic-color), 0.3);
}

.letter-cell.ok-key.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===============================================
   NAVIGATION
   =============================================== */

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    z-index: 1000;
    pointer-events: none;
}

.top-nav a,
.bottom-nav a {
    -webkit-tap-highlight-color: transparent;
}

.top-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.55rem 1.5rem;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
}

.top-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
    box-shadow:
        0 12px 40px 0 rgba(0, 0, 0, 0.45),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
    opacity: 1;
}

.top-nav a:active {
    transform: translateY(0) scale(0.98);
    background: rgba(255, 255, 255, 0.15);
}

.top-nav a.active {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    display: none;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
    flex: 1;
    padding: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.bottom-nav .nav-item.active {
    color: #fff;
}

.bottom-nav .nav-icon {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.bottom-nav .nav-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ===============================================
   FEED VIEW STYLES
   =============================================== */

.feed-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    z-index: 1;
    overscroll-behavior-y: contain;
}

.feed-container::-webkit-scrollbar {
    display: none;
}

.feed-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.video-item {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #000;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.video-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: auto;
    -webkit-tap-highlight-color: transparent;
    pointer-events: none;
    -webkit-touch-callout: none;
}

.video-caption {
    position: absolute;
    bottom: 100px;
    left: 20px;
    right: 20px;
    z-index: 10;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9),
                 0 0 20px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.video-caption h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.video-caption p {
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
    opacity: 0.9;
}

/* Video Loading Indicator (Mobile) */
.video-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.video-loading-indicator.active {
    opacity: 1;
    visibility: visible;
}

.video-loading-indicator .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(var(--dynamic-color), 0.2);
    border-top-color: rgb(var(--dynamic-color));
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 20px rgba(var(--dynamic-color), 0.3);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.scroll-indicator {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.scroll-indicator.active {
    opacity: 1;
}

.scroll-indicator::before {
    content: '˅';
    display: block;
    animation: gentleBounce 2s ease-in-out infinite;
}

@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    50% {
        transform: translateY(8px);
        opacity: 0.8;
    }
}

/* ===============================================
   AUDIO VIEW STYLES
   =============================================== */

.audio-gradient-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.audio-gradient-canvas.active {
    opacity: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 2rem 4rem;
    position: relative;
    z-index: 1;
}

#contactView .container {
    max-width: 800px;
    padding: 120px 2rem 4rem;
}

h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 3rem;
    letter-spacing: -0.05em;
    line-height: 0.9;
}

#contactView h1 {
    font-size: 5rem;
}

h2 {
    font-size: 0.75rem;
    font-weight: 700;
    margin: 0 0 1rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.5;
}

p {
    font-size: 1rem;
    margin-bottom: 3rem;
    opacity: 0.7;
    line-height: 1.7;
}

#contactView p {
    max-width: 600px;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.album-item {
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
    border: 3px solid transparent;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #111;
}

.album-item:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.album-item.playing {
    border-color: #fff;
    animation: pulseBorder 2s ease-in-out infinite;
}

@keyframes pulseBorder {
    0%, 100% {
        border-color: #fff;
        box-shadow: 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        border-color: rgba(255, 255, 255, 0.7);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    }
}

.album-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.album-item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.3s;
}

.album-item:hover .album-item-title {
    opacity: 1;
}

.player-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: #000;
    border-top: 3px solid #fff;
    display: none; /* Hidden - using mini player instead */
    align-items: center;
    padding: 0;
    z-index: 1500;
}

.player-now-playing {
    width: 300px;
    height: 100px;
    display: flex;
    align-items: center;
    gap: 0;
    border-right: 3px solid #fff;
    flex-shrink: 0;
}

.player-artwork {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    background: #111;
    border-right: 3px solid #fff;
}

.player-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.player-track-info {
    flex: 1;
    padding: 0 1.5rem;
}

.player-track-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.player-track-time {
    font-size: 0.7rem;
    opacity: 0.6;
    font-family: 'Courier New', monospace;
}

.player-buttons {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    height: 100px;
}

.player-btn {
    width: 80px;
    height: 100px;
    background: #000;
    border: none;
    border-right: 3px solid #fff;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.player-btn:last-child {
    border-right: 3px solid #fff;
}

.player-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.player-btn:hover::before {
    transform: scaleY(1);
}

.player-btn:hover {
    color: #000;
}

.player-btn > * {
    position: relative;
    z-index: 1;
}

.player-btn.play-pause {
    width: 100px;
}

.player-btn .play-icon,
.player-btn .pause-icon {
    display: none;
}

.player-btn.playing .pause-icon {
    display: block;
}

.player-btn:not(.playing) .play-icon {
    display: block;
}

.player-volume {
    width: 200px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    border-left: 3px solid #fff;
    flex-shrink: 0;
}

input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #fff;
    cursor: pointer;
    border: 2px solid #000;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #fff;
    cursor: pointer;
    border: 2px solid #000;
}

.volume-icon {
    font-size: 1rem;
    margin-right: 1rem;
}

/* ===============================================
   CONTACT VIEW STYLES
   =============================================== */

.contact-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin: 0;
    border: 3px solid #fff;
}

.contact-method {
    background: #000;
    border: none;
    border-right: 3px solid #fff;
    border-bottom: 3px solid #fff;
    padding: 3rem 2rem;
    text-align: left;
    text-decoration: none;
    color: #fff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.contact-method:nth-child(2n) {
    border-right: none;
}

.contact-method:nth-child(3),
.contact-method:nth-child(4) {
    border-bottom: none;
}

.contact-method::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.contact-method:hover::before {
    transform: scaleX(1);
}

.contact-method:hover {
    color: #000;
}

.contact-method > * {
    position: relative;
    z-index: 1;
}

.contact-method-icon {
    font-size: 3rem;
    line-height: 1;
    filter: grayscale(1);
}

.contact-method-label {
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.contact-method-value {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ===============================================
   FLOATING BUTTONS
   =============================================== */

.floating-contact-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    display: none;
    padding: 0.55rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    height: 35px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.floating-contact-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow:
        0 12px 40px 0 rgba(0, 0, 0, 0.45),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
}

.floating-contact-btn:active {
    transform: translateY(0) scale(0.98);
    background: rgba(255, 255, 255, 0.15);
}

.floating-back-btn {
    position: fixed;
    top: 120px;
    left: 40px;
    z-index: 2000;
    display: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
}

.floating-back-btn::before {
    content: '←';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    position: relative;
    top: -2px;
}

.floating-back-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(-2px);
    box-shadow:
        0 12px 40px 0 rgba(0, 0, 0, 0.45),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
}

.floating-back-btn:active {
    transform: translateX(0) scale(0.98);
    background: rgba(255, 255, 255, 0.15);
}

/* ===============================================
   MINI MUSIC PLAYER (Persistent)
   =============================================== */

.mini-player {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1500;
    display: none;
    background: transparent;
    border: none;
    padding: 0;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mini-player.visible {
    display: flex;
}

.mini-player-artwork {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    border: none;
    overflow: hidden;
    background: transparent;
    border-radius: 2px;
}

.mini-player-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mini-player-info {
    flex: 1;
    overflow: hidden;
    border: none;
    height: auto;
    display: flex;
    align-items: center;
}

.mini-player-track-name {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.track-name-text {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    display: inline-block;
}

.track-name-text.scroll-text {
    animation: marquee 15s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.mini-player-play-pause {
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    flex-shrink: 0;
    padding: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.mini-player-play-pause:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.mini-player-play-pause .play-icon,
.mini-player-play-pause .pause-icon {
    display: none;
}

.mini-player-play-pause.playing .pause-icon {
    display: block;
}

.mini-player-play-pause:not(.playing) .play-icon {
    display: block;
}

.mini-player-progress {
    flex-shrink: 0;
    width: 100px;
    display: flex;
    align-items: center;
}

.mini-seek-bar {
    width: 100%;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
    border-radius: 2px;
}

.mini-seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.mini-seek-bar::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: #fff;
    cursor: pointer;
    border: none;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.mini-player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mini-player-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.mini-player-btn:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.mini-control-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.mini-control-btn:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

/* Reposition mini-player on contact page */
#contactView.active ~ .mini-player.visible {
    top: 120px;
    right: 40px;
    left: auto;
    bottom: auto;
}

/* ===============================================
   MOBILE RESPONSIVE
   =============================================== */

@media (max-width: 768px) {
    .top-nav {
        display: none;
    }

    .bottom-nav {
        display: none;
    }

    .floating-contact-btn {
        display: flex;
        bottom: 20px;
        right: 20px;
    }

    #audioView .floating-back-btn,
    #contactView .floating-back-btn {
        display: flex;
        top: 20px;
        left: 20px;
    }

    .video-caption {
        bottom: 30px;
        left: 15px;
        right: 15px;
    }

    .scroll-indicator {
        bottom: 100px;
        font-size: 1.2rem;
    }

    .mini-player {
        bottom: 20px;
        left: 20px;
        gap: 6px;
    }

    .mini-player-artwork {
        width: 35px;
        height: 35px;
    }

    .mini-player-info {
        width: 80px;
    }

    .track-name-text {
        font-size: 0.65rem;
    }

    .track-name-text.scroll-text {
        animation: marquee 12s linear infinite;
    }

    .mini-player-play-pause {
        font-size: 1rem;
    }

    /* Audio page mobile */
    .album-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .player-now-playing {
        width: 250px;
    }

    .player-btn {
        width: 60px;
    }

    .player-btn.play-pause {
        width: 80px;
    }

    .player-volume {
        width: 150px;
        padding: 0 1.5rem;
    }

    /* Contact page mobile */
    .container {
        padding: 2rem 1.5rem;
    }

    #audioView .container {
        padding: 100px 2rem 4rem;
    }

    #contactView .container {
        padding: 100px 1.5rem 2rem;
    }

    h1 {
        font-size: 3rem;
    }

    #contactView h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 0.65rem;
    }

    p {
        font-size: 0.95rem;
    }

    .contact-methods {
        grid-template-columns: 1fr;
        border-width: 2px;
    }

    .contact-method {
        padding: 2.5rem 1.5rem;
        border-right: none !important;
        border-bottom: 2px solid #fff !important;
    }

    .contact-method:last-child {
        border-bottom: none !important;
    }

    .contact-method-icon {
        font-size: 2.5rem;
    }

    .contact-method-label {
        font-size: 0.65rem;
    }

    .contact-method-value {
        font-size: 1rem;
    }

    /* Intro mobile */
    .ascii-box {
        padding: 0.8rem;
        max-width: 90vw;
        overflow: hidden;
    }

    .ascii-box.show-box {
        box-shadow:
            inset 0 0 20px rgba(var(--dynamic-color), 0.12),
            0 0 20px rgba(var(--dynamic-color), 0.35),
            0 0 40px rgba(var(--dynamic-color), 0.2);
        animation: none;
    }

    .ascii-art {
        font-size: 3px;
        text-shadow: 0 0 8px rgb(var(--dynamic-color));
        width: 290px; /* Fixed width for mobile */
    }

    .intro-content {
        gap: 1.5rem;
    }

    .start-button {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }

    .name-entry {
        gap: 1rem;
        max-width: 95vw;
    }

    .name-entry-title {
        font-size: 1.1rem;
        letter-spacing: 0.15em;
    }

    .name-display {
        font-size: 1.4rem;
        min-width: 180px;
    }

    .letter-grid {
        gap: 6px;
        max-width: 100%;
    }

    .keyboard-row {
        gap: 4px;
    }

    .letter-cell {
        min-width: 32px;
        height: 40px;
        font-size: 0.95rem;
    }

    .letter-cell.special-key {
        font-size: 0.8rem;
        min-width: 50px;
    }

    .letter-cell.shift-key,
    .letter-cell.delete-key {
        font-size: 1.1rem;
        min-width: 50px;
    }

    .letter-cell.space-key {
        min-width: 150px;
    }

    .letter-cell.ok-key {
        min-width: 60px;
    }

    .control-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.8rem;
        border-width: 1px;
    }

    .control-btn.space-btn {
        padding: 0.5rem 1.2rem;
    }

    /* Reposition mini-player on contact page for mobile */
    #contactView.active ~ .mini-player.visible {
        top: 20px;
        right: 20px;
        left: auto;
        bottom: auto;
    }

    /* Hide playback slider on mobile in feed view only */
    #feedView.active ~ .mini-player.visible .mini-player-progress {
        display: none;
    }
}

@media (min-width: 769px) {
    .floating-contact-btn {
        display: none;
    }

    #audioView .floating-contact-btn,
    #contactView .floating-contact-btn {
        display: none;
    }

    #audioView .floating-back-btn {
        display: flex;
    }

    #contactView .floating-back-btn {
        display: flex;
    }

    .video-caption {
        bottom: 40px;
        left: 40px;
        right: 40px;
    }

    .video-caption h3 {
        font-size: 1.5rem;
    }

    .video-caption p {
        font-size: 1rem;
    }

    .scroll-indicator {
        bottom: 40px;
    }

    .mini-player-info {
        width: 180px;
    }

    .track-name-text.scroll-text {
        animation: marquee 20s linear infinite;
    }

    /* Reposition mini-player on contact page for desktop */
    #contactView.active ~ .mini-player.visible {
        top: 132px;
        right: 30px;
    }

    /* Add padding for audio view on desktop */
    #audioView .container {
        padding: 200px 2rem 4rem;
    }
}

/* Mobile Safari fixes */
@supports (-webkit-touch-callout: none) {
    body {
        height: -webkit-fill-available;
    }

    .intro,
    .view,
    .feed-container,
    .video-item {
        height: -webkit-fill-available;
    }

    .video-item video {
        -webkit-media-controls-play-button: none !important;
        -webkit-media-controls-start-playback-button: none !important;
    }
}

/* Prevent text selection on UI elements */
.top-nav a,
.bottom-nav .nav-item,
.start-button,
.scroll-indicator {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Prevent pull-to-refresh on mobile */
body {
    overscroll-behavior-y: contain;
}

@media (max-width: 768px) {
    .feed-container {
        scroll-behavior: auto;
    }

    .video-item {
        contain: layout style paint;
    }

    .video-item video {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
    }
}
