/* ============================================
   THE HUNT - PUZZLE GAME STYLING
   Inspired by Ready Player One Gunters
   ============================================ */

/* CSS Variables */
:root {
    --bg-primary: #030305;
    --bg-secondary: #080810;
    --bg-tertiary: #0c0c14;
    --bg-card: linear-gradient(145deg, #0a0a12 0%, #050508 100%);
    
    --text-primary: #e8e8f0;
    --text-secondary: #9090a0;
    --text-muted: #505060;
    --text-dim: #303040;
    
    --accent-primary: #ffffff;
    --accent-secondary: #c0c0c0;
    --accent-dark: #808080;
    --accent-glow: rgba(255, 255, 255, 0.15);
    
    --accent-blue: #4080ff;
    --accent-green: #40ff80;
    --accent-red: #ff4060;
    --accent-purple: #8040ff;
    
    --glow-white: rgba(255, 255, 255, 0.1);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(255, 255, 255, 0.2);
    
    --panel-bg: rgba(8, 8, 16, 0.95);
    
    --font-display: 'Press Start 2P', monospace;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ============================================
   PARTICLES CANVAS
   ============================================ */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* ============================================
   FLOATING PROFILE ORB
   ============================================ */
.profile-orb {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: var(--bg-secondary);
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-normal);
    opacity: 0.4;
}

.profile-orb:hover {
    opacity: 0.8;
    border-color: rgba(255, 255, 255, 0.3);
}

.profile-orb .orb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    transition: filter var(--transition-normal);
}

.orb-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    animation: subtle-pulse 4s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.3; }
}

/* ============================================
   MODAL SYSTEM
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    opacity: 1;
    transition: opacity var(--transition-normal);
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0 12px 0 12px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(1);
    transition: transform var(--transition-normal);
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.9);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 0 6px 0 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Profile Modal */
.profile-modal {
    text-align: center;
}

.profile-card {
    margin-bottom: 24px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    image-rendering: auto;
    image-rendering: crisp-edges;
}

.profile-name {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.profile-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.profile-ens {
    margin-bottom: 16px;
}

.profile-ens a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.profile-ens a:hover {
    color: var(--accent-primary);
}

.profile-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 0 8px 0 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.profile-link:hover {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
}

.profile-link img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.profile-wallet {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 0 8px 0 8px;
}

.profile-wallet code {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Contact Modal */
.contact-modal {
    max-width: 350px;
    text-align: center;
}

.contact-card {
    padding: 20px 0;
}

.contact-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    filter: grayscale(1) brightness(1.3);
}

.contact-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.contact-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.email-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 0 8px 0 8px;
    justify-content: center;
}

.email-display code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-primary);
}

button.profile-link {
    cursor: pointer;
}

.copy-btn {
    width: 28px;
    height: 28px;
    padding: 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0 4px 0 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
}

.copy-btn img {
    width: 14px;
    height: 14px;
    opacity: 0.6;
    filter: brightness(2);
}

.copy-btn svg {
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.copy-btn:hover svg {
    color: var(--accent-primary);
}

/* ============================================
   HUNT CONTAINER
   ============================================ */
.hunt-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 20px 40px;
}

/* ============================================
   GATE PROGRESS BAR
   ============================================ */
.gate-progress {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 30px;
    padding: 16px 24px;
    background: rgba(8, 8, 16, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 0 12px 0 12px;
    backdrop-filter: blur(10px);
}

.gate-marker {
    width: 40px;
    height: 40px;
    border-radius: 0 6px 0 6px;
    border: 1px solid var(--text-dim);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    opacity: 0.4;
}

.gate-marker img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    transition: all var(--transition-normal);
}

.gate-marker.completed {
    border-color: var(--accent-primary);
    opacity: 1;
}

.gate-marker.completed img {
    filter: none;
}

.gate-marker.active {
    border-color: var(--accent-secondary);
    opacity: 1;
    animation: pulse-gate 2s ease-in-out infinite;
}

.gate-marker.active img {
    filter: brightness(1.2);
}

.gate-marker.final {
    width: 48px;
    height: 48px;
}

.gate-marker.final img {
    width: 28px;
    height: 28px;
}

.gate-connector {
    width: 24px;
    height: 2px;
    background: var(--text-dim);
    transition: background var(--transition-normal);
}

.gate-connector.completed {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

@keyframes pulse-gate {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.1); }
    50% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.2); }
}

/* ============================================
   LEVEL DISPLAY
   ============================================ */
.level-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 20px;
    font-family: var(--font-display);
}

.level-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.level-number {
    font-size: 2rem;
    color: var(--accent-primary);
}

.level-of {
    font-size: 0.65rem;
    color: var(--text-dim);
}

.level-checkmark {
    width: 2rem;
    height: 2rem;
    vertical-align: middle;
}

/* ============================================
   HUNT PANEL
   ============================================ */
.hunt-panel {
    width: 100%;
    max-width: 600px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hunt-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0 16px 0 16px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
    animation: screen-enter 0.5s ease;
    position: relative;
}

.hunt-screen.active {
    display: flex;
}

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

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

/* Welcome Screen */
.screen-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 24px;
}

.screen-icon.welcome-glow {
    animation: greenGlow 5s ease-in-out infinite;
}

@keyframes greenGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.25));
    }
    50% { 
        filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.5)) drop-shadow(0 0 25px rgba(34, 197, 94, 0.25));
    }
}

.screen-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.screen-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--accent-primary);
    margin-bottom: 16px;
    letter-spacing: 4px;
}

.screen-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    max-width: 400px;
}

.screen-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-style: italic;
}

.screen-whisper {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 24px;
    font-style: italic;
}

/* Gate Screen */
.gate-header {
    margin-bottom: 30px;
}

.gate-number {
    font-family: var(--font-display);
    font-size: 0.65rem;
    color: var(--accent-blue);
    letter-spacing: 4px;
    display: block;
    margin-bottom: 8px;
}

.gate-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--accent-primary);
}

.gate-timer {
    position: absolute;
    top: 12px;
    right: 12px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-secondary);
    padding: 4px 10px;
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 0 6px 0 6px;
    min-width: 40px;
    text-align: center;
}

.gate-timer.warning {
    color: var(--accent-red);
    border-color: var(--accent-red);
    animation: timer-pulse 0.5s ease-in-out infinite;
}

@keyframes timer-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.riddle-container {
    margin-bottom: 30px;
}

.riddle-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 24px;
    animation: float 4s ease-in-out infinite;
}

.riddle-text {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.7;
}

.riddle-text code {
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 0 4px 0 4px;
    color: var(--accent-primary);
}

.riddle-quote {
    font-style: normal;
    color: var(--text-secondary);
    padding: 20px 24px;
    border-left: none;
    background: transparent;
    margin: 16px 0;
    text-align: left;
    border: none;
    line-height: 2;
    font-size: 0.95rem;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

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

.answer-input {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 400px;
}

.answer-input input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 0 8px 0 8px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.answer-input input:focus {
    outline: none;
    border-color: var(--text-muted);
}

.answer-input input::placeholder {
    color: var(--text-dim);
}

.answer-feedback {
    margin-top: 16px;
    padding: 12px 20px;
    border-radius: 0 8px 0 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.answer-feedback.error {
    background: rgba(255, 64, 96, 0.1);
    border: 1px solid rgba(255, 64, 96, 0.3);
    color: var(--accent-red);
}

.answer-feedback.success {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(64, 255, 128, 0.25) 50%, rgba(0, 255, 68, 0.15) 100%);
    border: 1px solid rgba(64, 255, 128, 0.5);
    color: #00FF88;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    box-shadow: 
        0 0 20px rgba(0, 255, 136, 0.3),
        inset 0 0 30px rgba(0, 255, 136, 0.1);
    animation: gate-open-pulse 0.8s ease-out;
}

@keyframes gate-open-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0;
        box-shadow: 0 0 0 rgba(0, 255, 136, 0);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 
            0 0 40px rgba(0, 255, 136, 0.6),
            inset 0 0 40px rgba(0, 255, 136, 0.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 
            0 0 20px rgba(0, 255, 136, 0.3),
            inset 0 0 30px rgba(0, 255, 136, 0.1);
    }
}

.feedback-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
    filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.8));
    animation: feedback-icon-glow 1s ease-in-out infinite alternate;
}

@keyframes feedback-icon-glow {
    0% {
        filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 15px rgba(0, 255, 136, 1));
    }
}

.answer-feedback.hidden {
    display: none;
}

/* Global Sparks Canvas */
.sparks-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

/* Victory Screen */
#screen-victory {
    position: relative;
}

.victory-icon {
    animation: phoenix-glow 3s ease-in-out infinite;
}

@keyframes phoenix-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 15px rgba(255, 50, 0, 0.3));
    }
    50% { 
        filter: drop-shadow(0 0 30px rgba(255, 80, 0, 0.6)) drop-shadow(0 0 60px rgba(255, 50, 0, 0.3));
    }
}

/* Wallet Collection Form */
.wallet-collection {
    width: 100%;
    max-width: 450px;
    margin: 24px 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 0 12px 0 12px;
}

.wallet-intro {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-align: center;
}

.wallet-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wallet-connect-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
}

.wallet-connect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 0 8px 0 8px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.wallet-connect-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: var(--accent-primary);
}

.wallet-connect-btn.connected {
    display: none;
}

.wallet-btn-icon {
    width: 22px;
    height: 22px;
}

.wallet-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--accent-secondary);
    border-radius: 0 8px 0 8px;
}

.wallet-display.hidden {
    display: none;
}

.wallet-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wallet-ens {
    color: var(--accent-secondary);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
}

.wallet-ens.hidden {
    display: none;
}

.wallet-address-hex {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.wallet-address {
    color: var(--accent-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    word-break: break-all;
}

.wallet-disconnect {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.wallet-disconnect:hover {
    color: var(--text-primary);
}

.note-input {
    width: 100%;
    min-height: 80px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 0 8px 0 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.note-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.note-input::placeholder {
    color: var(--text-muted);
}

.char-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: right;
}

.skip-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 8px;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.skip-link:hover {
    color: var(--text-secondary);
}

.wallet-required-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 12px;
}

#generateHashBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.victory-title {
    animation: text-glow 2s ease-in-out infinite;
}

@keyframes text-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.reward-container {
    width: 100%;
    max-width: 450px;
    margin: 24px 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 0 12px 0 12px;
}

.hash-display {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.hash-label {
    width: 100%;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.hash-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-primary);
    background: rgba(0, 0, 0, 0.4);
    padding: 12px 16px;
    border-radius: 0 6px 0 6px;
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.hash-instruction {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hash-instruction a {
    color: var(--accent-blue);
    text-decoration: none;
}

.hash-instruction a:hover {
    text-decoration: underline;
}

/* Final Riddle */
.final-riddle {
    margin: 32px 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 0 12px 0 12px;
    max-width: 500px;
}

.final-riddle-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 16px;
    animation: portal-pulse 3s ease-in-out infinite;
}

@keyframes portal-pulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.final-riddle-intro {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.final-riddle-text {
    color: var(--text-secondary);
    line-height: 1.8;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
}

.final-riddle-hint {
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* ============================================
   HUNT BUTTONS
   ============================================ */
.hunt-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 0 8px 0 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.hunt-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.hunt-btn.primary {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

.hunt-btn.primary:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.hunt-btn.secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.hunt-btn.secondary:hover {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
}

.hunt-btn.submit {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
    padding: 14px 24px;
    font-weight: 500;
}

.hunt-btn.submit:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
}

.hunt-btn.legendary {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

.hunt-btn.legendary:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

/* ============================================
   FOOTER
   ============================================ */
.hunt-footer {
    margin-top: auto;
    padding-top: 40px;
    text-align: center;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition-fast);
    padding: 12px 20px;
    border: 1px solid transparent;
}

.footer-link:hover {
    color: var(--text-primary);
    border-color: var(--border-color);
}

.footer-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.footer-text a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-text a:hover {
    color: var(--accent-primary);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0 8px 0 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 3000;
    opacity: 0;
    transition: all var(--transition-normal);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.hidden {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.toast-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    .hunt-container {
        padding: 60px 16px 24px;
    }
    
    .gate-progress {
        padding: 12px 16px;
        gap: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .gate-marker {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }
    
    .gate-marker img {
        width: 18px;
        height: 18px;
    }
    
    .gate-marker.final {
        width: 38px;
        height: 38px;
    }
    
    .gate-connector {
        width: 16px;
    }
    
    .screen-title {
        font-size: 1.3rem;
        letter-spacing: 2px;
    }
    
    .gate-title {
        font-size: 1rem;
    }
    
    .hunt-screen {
        padding: 30px 20px;
    }
    
    .answer-input {
        flex-direction: column;
    }
    
    .answer-input input {
        width: 100%;
    }
    
    .profile-links {
        grid-template-columns: 1fr;
    }
    
    .links-container {
        flex-direction: column;
        width: 100%;
    }
    
    .links-container .hunt-btn {
        width: 100%;
        justify-content: center;
    }
    
}

/* ============================================
   GATE 5 SUB-RIDDLES
   ============================================ */
.sub-riddle {
    transition: all var(--transition-normal);
}

.sub-riddle.hidden {
    display: none;
}

.sub-riddle.active {
    animation: fadeInUp 0.5s ease;
}

.sub-progress {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 6px 0 6px;
    display: inline-block;
}

/* ============================================
   RIDDLE TEXT ANIMATION
   ============================================ */
.riddle-quote.typewriter-container {
    /* No longer using typewriter - simple fade-in */
    animation: fadeIn 0.6s ease forwards;
}

/* ============================================
   GATE 6 PRE-SLOT CLUE
   ============================================ */
.pre-slot-clue {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 0 12px 0 12px;
    margin: 1.5rem 0;
}

.pre-slot-clue.hidden {
    display: none;
}

.clue-whisper {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.clue-riddle {
    color: var(--accent-secondary);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.8;
    border-left: 2px solid var(--accent-secondary);
    padding-left: 1.5rem;
    margin: 1.5rem auto;
    max-width: 450px;
    text-align: left;
}

.clue-riddle em {
    color: var(--text-muted);
    display: block;
    margin-top: 0.5rem;
}

#revealSlotBtn {
    margin-top: 1.5rem;
    background: rgba(0, 0, 0, 0.8);
    border-color: var(--border-color);
    color: var(--text-primary);
}

#revealSlotBtn:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ============================================
   GATE 6 SLOT MACHINE
   ============================================ */
.slot-machine {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(145deg, #1a1a2e, #0f0f1a);
    border: 2px solid #333;
    border-radius: 0 16px 0 16px;
    margin: 1rem 0;
    box-shadow: 
        inset 0 2px 10px rgba(0,0,0,0.5),
        0 0 20px rgba(255, 215, 0, 0.1);
}

.slot-header {
    text-align: center;
    padding: 0.5rem;
    background: linear-gradient(90deg, #8B0000, #4a0000);
    border-radius: 0 8px 0 8px;
    margin: -1.5rem -1.5rem 0 -1.5rem;
    border-bottom: 2px solid #333;
}

.slot-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: #ffd700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.slot-display {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    padding: 0.75rem;
}

.slot-score, .slot-jackpot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1.5rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    border-radius: 0 6px 0 6px;
}

.score-label, .jackpot-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
}

.score-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: #4ade80;
}

.jackpot-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.slot-reels {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 1rem;
    background: linear-gradient(180deg, #111 0%, #1a1a1a 50%, #111 100%);
    border: 2px solid #222;
    border-radius: 0 8px 0 8px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.reel {
    width: 70px;
    height: 80px;
    background: linear-gradient(180deg, #0a0a0a, #1a1a1a, #0a0a0a);
    border: 2px solid #333;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.reel-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: transform 0.1s ease;
}

.reel-inner img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.reel.spinning .reel-inner {
    animation: reelSpin 0.1s linear infinite;
}

@keyframes reelSpin {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.slot-result {
    text-align: center;
    padding: 0.5rem;
    min-height: 2rem;
}

.slot-result .result-text {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: #ffd700;
}

.slot-result.win .result-text {
    color: #4ade80;
    animation: pulse 0.5s ease;
}

.slot-result.lose .result-text {
    color: #888;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.slot-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.slot-spin {
    background: linear-gradient(180deg, #22c55e, #16a34a) !important;
    color: #000 !important;
    font-weight: 700 !important;
    min-width: 150px;
    box-shadow: 0 4px 0 #166534;
}

.slot-spin:hover {
    background: linear-gradient(180deg, #4ade80, #22c55e) !important;
}

.slot-spin:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #166534;
}

.slot-spin:disabled {
    background: #333 !important;
    color: #666 !important;
    box-shadow: none;
    cursor: not-allowed;
}

.slot-wisdom {
    text-align: center;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 6px 0 6px;
    border: 1px solid #222;
}

.wisdom-text {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.challenge-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 8px 0 8px;
    border: 1px dashed var(--border-color);
    text-align: center;
}

.hint-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-dim);
    padding: 8px 16px;
    border-radius: 0 4px 0 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all var(--transition-normal);
}

.hint-toggle:hover {
    border-color: var(--text-muted);
    color: var(--text-secondary);
}

.skinner-riddle {
    margin-top: 1rem;
    text-align: left;
}

.skinner-riddle .riddle-quote {
    font-size: 0.85rem;
    padding: 12px;
    margin: 0;
}

/* Mobile adjustments for slot machine */
@media (max-width: 480px) {
    .slot-machine {
        padding: 1rem;
    }
    
    .slot-header {
        margin: -1rem -1rem 0 -1rem;
    }
    
    .reel {
        width: 55px;
        height: 65px;
    }
    
    .reel-inner img {
        width: 40px;
        height: 40px;
    }
    
    .slot-controls {
        flex-direction: column;
    }
    
    .slot-controls .hunt-btn {
        width: 100%;
    }
    
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
