@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;500;600;700&display=swap');

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

/* Center everything */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #000000;
    color: white;
    font-family: Arial, sans-serif;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    font-family: 'Courier New', monospace;
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    letter-spacing: 1px;
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-brand:hover {
    color: #ccc;
}

.navbar-brand .typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: white;
    margin-left: 3px;
    animation: blink 1s infinite;
    vertical-align: text-bottom;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 15px 25px;
    color: #ccc;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 5px;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    gap: 4px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
    border-top: 1px solid #333;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 20px 40px;
    gap: 10px;
    list-style: none;
}

.mobile-nav .nav-link {
    margin: 0;
    text-align: center;
    border-bottom: 1px solid #333;
    border-radius: 0;
}

.mobile-nav .nav-link:last-child {
    border-bottom: none;
}

/* Main content area */
main {
    min-height: 100vh;
    padding-top: 70px;
}

/* Page containers */
.page {
    width: 100%;
    min-height: calc(100vh - 70px);
}

/* Prevent scrolling on mobile for all pages */
@media (max-width: 768px) {
    body {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    main {
        overflow: hidden;
        height: 100vh;
    }
    
    .page {
        height: 100vh;
        overflow: hidden;
    }
}

/* Home page styles */
.home-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 70px);
    background: #000;
    position: relative;
    overflow: hidden;
}

.home-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

/* ASCII Rain Background */
.ascii-rain-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.ascii-rain-drop {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: white;
    white-space: pre;
    animation: rain-fall linear infinite;
    opacity: 0.6;
}

.ascii-rain-drop:nth-child(odd) {
    opacity: 0.4;
}

.ascii-rain-drop:nth-child(3n) {
    opacity: 0.8;
}

@keyframes rain-fall {
    0% {
        transform: translateY(-300px);  /* Start just above the screen */
        opacity: 0.6;  /* Start visible immediately */
    }
    95% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

@keyframes rain-fall-initial {
    0% {
        transform: translateY(-50vh); /* Start halfway up for instant visibility */
        opacity: 0.6;
    }
    95% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Quick Access Row */
.quick-access-center {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    max-width: 800px;
    margin: 0 auto;
}

.quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.quick-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* All hover colors set to white */
.quick-btn[data-site="youtube"]:hover { border-color: rgba(255, 255, 255, 0.6); color: white; }
.quick-btn[data-site="twitch"]:hover { border-color: rgba(255, 255, 255, 0.6); color: white; }
.quick-btn[data-site="x"]:hover { border-color: rgba(255, 255, 255, 0.6); color: white; }
.quick-btn[data-site="chess"]:hover { border-color: rgba(255, 255, 255, 0.6); color: white; }
.quick-btn[data-site="lichess"]:hover { border-color: rgba(255, 255, 255, 0.6); color: white; }
.quick-btn[data-site="facebook"]:hover { border-color: rgba(255, 255, 255, 0.6); color: white; }
.quick-btn[data-site="claude"]:hover { border-color: rgba(255, 255, 255, 0.6); color: white; }
.quick-btn[data-site="github"]:hover { border-color: rgba(255, 255, 255, 0.6); color: white; }
.quick-btn[data-site="wootility"]:hover { border-color: rgba(255, 255, 255, 0.6); color: white; }

.ascii-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1;
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.ascii-layer {
    position: absolute;
    white-space: pre;
    animation: scroll-up 20s linear infinite;
}

.ascii-layer:nth-child(2) {
    animation-delay: -5s;
    opacity: 0.8;
}

.ascii-layer:nth-child(3) {
    animation-delay: -10s;
    opacity: 0.6;
}

.ascii-layer:nth-child(4) {
    animation-delay: -15s;
    opacity: 0.4;
}

@keyframes scroll-up {
    0% {
        transform: translateY(100vh);
    }
    100% {
        transform: translateY(-100%);
    }
}

.matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.matrix-column {
    position: absolute;
    top: -100px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #0f3;
    opacity: 0.3;
    animation: matrix-fall linear infinite;
}

@keyframes matrix-fall {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

.floating-ascii {
    position: absolute;
    font-family: 'Courier New', monospace;
    color: rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 3;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.3;
    }
}

.ascii-text {
    font-family: 'Courier New', monospace;
    font-size: 6rem;
    color: white;
    text-align: center;
    white-space: pre;
    line-height: 1.2;
    font-weight: bold;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: glow 3s ease-in-out infinite alternate;
    position: relative;
    z-index: 10;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.3);
    }
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: white;
    margin-left: 5px;
    animation: blink 1s infinite;
}

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

/* Store page styles */
.store-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 70px);
    padding: 20px;
    width: 100%;
    overflow: hidden;
}

h1 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 40px;
    font-size: 2.8em;
    font-weight: 300;
    letter-spacing: 1px;
}

.login-section {
    max-width: 600px;
    margin: 0 auto;
    background: #111111;
    padding: 40px;
}

.login-section h2 {
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 400;
    font-size: 1.5em;
}

.login-section p {
    color: #cccccc;
    margin-bottom: 20px;
}

#cookie-input {
    width: 100%;
    padding: 15px 20px;
    margin: 20px 0;
    background: #000000;
    border: 2px solid #333333;
    color: #ffffff;
    border-radius: 12px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#cookie-input:focus {
    outline: none;
    border-color: #666666;
}

button {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 20px auto;
    min-width: 120px;
}

button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.instructions {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #333333;
}

.instructions h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 500;
}

.instructions ol {
    margin-left: 20px;
    line-height: 1.8;
    color: #cccccc;
}

.instructions li {
    margin-bottom: 8px;
}

.instructions a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid #ffffff;
    transition: opacity 0.3s ease;
}

.instructions a:hover {
    opacity: 0.7;
}

.timer {
    text-align: center;
    font-size: 1.9em;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 700;
    padding: 40px;
    font-family: 'Arial Black', Impact, sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(4, 300px);
    gap: 20px;
    justify-content: center;
    margin: 0 auto;
}

/* Hide scrollbar but keep scrollable */
.store-grid::-webkit-scrollbar {
    height: 6px;
}

.store-grid::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.store-grid::-webkit-scrollbar-track {
    background: #222;
}

/* Skin card and info */
.skin-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skin-card {
    border: 4px solid #444;
    border-radius: 10px;
    padding: 5px;
    background-color: #000000;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.skin-card img {
    width: 220px;
    height: 180px;
    object-fit: contain;
}

/* Rarity border colors */
.skin-card[data-rarity="select"] { border-color: #5a9fd4; }
.skin-card[data-rarity="deluxe"] { border-color: #01ac7c; }
.skin-card[data-rarity="premium"] { border-color: #d1548d; }
.skin-card[data-rarity="ultra"],
.skin-card[data-rarity="exclusive"] { border-color: #f1b62e; }

.skin-card:hover {
    transform: translateY(-8px);
}

.skin-card:hover[data-rarity="select"] {
    box-shadow: 0 0 40px 25px rgba(90, 159, 212, 0.25);
}

.skin-card:hover[data-rarity="deluxe"] {
    box-shadow: 0 0 40px 25px rgba(1, 172, 124, 0.25);
}

.skin-card:hover[data-rarity="premium"] {
    box-shadow: 0 0 40px 25px rgba(209, 84, 141, 0.25);
}

.skin-card:hover[data-rarity="ultra"],
.skin-card:hover[data-rarity="exclusive"] {
    box-shadow: 0 0 40px 25px rgba(241, 182, 46, 0.25);
}

.skin-info {
    margin-top: 10px;
    text-align: center;
}

.skin-name {
    font-weight: bold;
    font-size: 1.1em;
}

.skin-price {
    color: #ccc;
}

.skin-price::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff"><path d="M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5z"/></svg>') no-repeat center;
    background-size: contain;
    margin-right: 6px;
    vertical-align: text-bottom;
    position: relative;
    top: -1px;
    margin-top: 8px;
}

.refresh-icon {
    margin: 85px auto 0;
    cursor: pointer;
    transition: transform 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.refresh-icon svg {
    width: 100%;
    height: 100%;
    stroke: white;
    stroke-width: 2;
    transition: transform 0.3s ease;
}

.refresh-icon:hover {
    transform: rotate(-90deg);
}

.refresh-icon.spin svg {
    animation: spin 1s linear infinite;
}

/* Aim page styles */
.aim-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 70px);
    padding: 20px;
    background: #000;
}

.aim-header {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    font-size: 1.2em;
    font-weight: bold;
}

.score-display, .timer-display {
    color: #fff;
    font-family: 'Courier New', monospace;
}

.game-info {
    text-align: center;
    margin-bottom: 30px;
}

.game-info h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 300;
}

.game-info p {
    color: #ccc;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.start-button {
    background: #ffffff;
    color: #000;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.start-button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 100px);
    grid-template-rows: repeat(4, 100px);
    gap: 3px;
    margin: 20px 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.grid-cell {
    width: 100px;
    height: 100px;
    background: #222;
    border: 2px solid #444;
    border-radius: 8px;
    cursor: crosshair;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

.grid-cell:hover {
    border-color: #666;
}

.grid-cell.active {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
    animation: pulse 1s infinite;
    cursor: crosshair;
}

.grid-cell.hit {
    background: #44ff44;
    border-color: #66ff66;
    display: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.7);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
        transform: scale(1);
    }
}

.game-over {
    text-align: center;
}

.game-over h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 300;
}

.game-over p {
    color: #ccc;
    margin-bottom: 10px;
    font-size: 1.2em;
}

#final-score {
    color: #fff;
    font-weight: bold;
    font-size: 1.5em;
}

/* Scale slider styles */
.scale-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    padding: 20px;
}

.slider-label {
    color: #fff;
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: 500;
}

.scale-slider {
    width: 200px;
    height: 6px;
    background: #333;
    border-radius: 3px;
    outline: none;
    margin: 10px 0;
    -webkit-appearance: none;
    appearance: none;
}

.scale-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.scale-slider::-webkit-slider-thumb:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.scale-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.scale-slider::-moz-range-thumb:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.slider-value {
    color: #ccc;
    font-size: 0.9em;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
}

/* Type page styles - Monkeytype inspired */
.type-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 70px);
    padding: 40px 20px;
    background: #000;
    max-width: 750px;
    margin: 0 auto;
}

.type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin-bottom: 40px;
}

.time-buttons {
    display: flex;
    gap: 15px;
}

.time-btn {
    background: transparent;
    color: #666;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Roboto Mono', monospace;
}

.time-btn:hover {
    color: #ccc;
    background: rgba(255, 255, 255, 0.05);
}

.time-btn.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.type-timer {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    min-width: 60px;
    text-align: center;
}

.type-text-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 180px; /* Increased from 150px to 180px */
    margin-bottom: 30px;
    overflow: visible; /* Make sure nothing is cut off */
    background: #000;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
}

.type-text {
    font-family: 'Roboto Mono', monospace;
    font-size: 24px;
    line-height: 1.8;
    color: #666;
    position: relative;
    height: 140px; /* Explicit height for the text area */
    overflow: visible;
    letter-spacing: 0.5px;
}

/* Text rows styling - ensure each row has enough space */
.text-row {
    height: 45px; /* Increased row height */
    overflow: visible;
    white-space: nowrap;
    margin-bottom: 2px; /* Reduced margin to fit more rows */
    display: block;
    position: relative;
}

.text-row:last-child {
    margin-bottom: 0;
}

/* Character styling */
.char {
    position: relative;
    transition: all 0.1s ease;
    border-radius: 2px;
    display: inline-block;
    min-width: 0.6ch;
}

.char.correct {
    color: #fff;
    background: transparent;
}

.char.incorrect {
    color: #e53e3e;
    background: transparent;
    border-radius: 2px;
}

.char.current {
    background: transparent;
    color: #666;
    animation: none;
}

.type-cursor {
    position: absolute;
    width: 2px;
    height: 24px; /* Reduced from 30px to 24px to match letter height */
    background: #fff;
    animation: cursor-blink 1s infinite;
    border-radius: 0px;
    z-index: 10;
    transition: all 0.1s ease;
}

@keyframes cursor-blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0.3; /* Change to 0.3 instead of 0 for subtle blinking */
    }
}

/* Input styling */
.type-input-container {
    width: 100%;
    max-width: 800px;
    margin-bottom: 30px;
}

.type-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: transparent;
    caret-color: transparent;
    font-size: 24px;
    font-family: 'Roboto Mono', monospace;
    padding: 15px 20px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.type-input:focus {
    border-color: #333;
}

/* Instructions */
.type-instructions {
    text-align: center;
    color: #666;
    font-size: 16px;
    margin-top: 20px;
}

.type-instructions p {
    margin: 0;
    font-family: 'Roboto Mono', monospace;
}

/* Stats display */
.type-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 800px;
    margin-top: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.stat {
    text-align: center;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: Arial, sans-serif;
}

.stat-value {
    font-size: 28px;
    color: #fff;
    font-weight: bold;
    font-family: 'Roboto Mono', monospace;
}

.restart-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

.restart-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* Smooth row transitions */
.type-text.scrolling {
    transition: transform 0.3s ease;
}

/* Loading styles */
.loading {
    text-align: center;
    padding: 60px;
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 4px solid #333333;
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading::after {
    display: none;
}

.error {
    background: #1a0000;
    color: #ff6b6b;
    border: 2px solid #ff6b6b;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    margin: 20px auto;
    max-width: 600px;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .type-container {
        padding: 20px 15px;
        min-height: calc(100vh - 70px);
        justify-content: flex-start;
        padding-top: 40px;
    }
    
    .type-header {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .time-buttons {
        gap: 15px;
    }
    
    .time-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .type-timer {
        font-size: 24px;
    }
    
    .type-text-container {
        height: 100px;
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .type-text {
        font-size: 18px;
        line-height: 1.5;
        letter-spacing: 0.3px;
    }
    
    .text-row {
        height: 32px;
    }
    
    .type-cursor {
        height: 22px;
    }
    
    .type-input {
        font-size: 18px;
        padding: 12px 15px;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .type-container {
        padding: 15px 10px;
        padding-top: 30px;
    }
    
    .type-text-container {
        height: 90px;
        padding: 12px;
    }
    
    .type-text {
        font-size: 16px;
        line-height: 1.4;
        letter-spacing: 0.2px;
    }
    
    .text-row {
        height: 28px;
    }
    
    .type-cursor {
        height: 20px;
        width: 2px;
    }
    
    .type-input {
        font-size: 16px;
        padding: 10px 12px;
    }
    
    .time-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .type-timer {
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .type-stats {
        padding: 20px;
    }
}

/* Mobile responsive - Tablet and up */
@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }

    .navbar-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Hide quick access buttons on mobile */
    .quick-access-center {
        display: none !important;
    }
    
    /* Make home page non-scrollable on mobile */
    .home-container {
        height: 100vh;
        overflow: hidden;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        padding-top: 70px;
    }
    
    /* Make store page non-scrollable on mobile */
    .store-container {
        height: 100vh;
        overflow: hidden;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 20px;
        padding-top: 90px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
    
    /* Fix ASCII rain on mobile */
    .ascii-rain-drop {
        font-size: 12px;
        opacity: 0.3;
    }

    /* 2x2 grid for mobile store */
    .store-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
        max-width: 100%;
        overflow: visible !important;
    }
    
    .skin-wrapper {
        width: 100%;
    }
    
    .skin-card {
        width: 100%;
        height: 180px;
        padding: 3px;
    }
    
    .skin-card img {
        width: 120px;
        height: 100px;
    }
    
    .skin-name {
        font-size: 0.9em;
    }
    
    .skin-price {
        font-size: 0.85em;
    }
    
    /* Timer text size */
    .timer {
        font-size: 1.5em;
        padding: 20px;
        margin-bottom: 10px;
    }
    
    /* Adjust refresh icon position */
    .refresh-icon {
        margin: 20px auto 0;
        position: relative;
    }

    .ascii-text {
        font-size: 4rem;
    }

    /* Better aim game on mobile */
    .aim-container {
        height: 100vh;
        overflow: hidden;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 0 20px;
        justify-content: center;
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    
    .game-grid {
        grid-template-columns: repeat(4, 70px);
        grid-template-rows: repeat(4, 70px);
        gap: 5px;
        margin: 5px 0;
    }
    
    .grid-cell {
        width: 70px;
        height: 70px;
        /* Prevent text selection on mobile */
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    .aim-header {
        gap: 20px;
        font-size: 1em;
        margin-bottom: 10px;
    }
    
    .game-info {
        margin-bottom: 10px;
    }
    
    .game-info h2 {
        font-size: 2em;
        margin-bottom: 5px;
    }
    
    .game-over {
        margin-top: 10px;
    }
    
    /* Hide scale slider on mobile */
    .scale-slider-container {
        display: none !important;
    }

    /* Mobile responsive for typing game */
    .type-container {
        padding: 20px 15px;
        min-height: calc(100vh - 70px);
        justify-content: flex-start;
        padding-top: 40px;
    }
    
    .type-header {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .time-buttons {
        gap: 15px;
    }
    
    .time-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .type-timer {
        font-size: 24px;
    }
    
    .type-text-container {
        height: 100px;
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .type-text {
        font-size: 18px;
        line-height: 1.5;
    }
    
    .text-row {
        height: 32px;
    }
    
    .type-cursor {
        height: 22px;
    }
    
    .type-input {
        font-size: 18px;
        padding: 12px 15px;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
}

/* Mobile responsive - Phone */
@media (max-width: 480px) {
    .navbar {
        padding: 0 15px;
    }

    .navbar-brand {
        font-size: 1.5rem;
    }

    .mobile-nav {
        padding: 20px 20px;
    }

    .login-section {
        padding: 30px 20px;
        border-radius: 15px;
    }

    /* Keep quick access hidden on phones too */
    .quick-access-center {
        display: none !important;
    }

    .ascii-text {
        font-size: 3rem;
    }
    
    /* Store container adjustments for phones */
    .store-container {
        padding: 15px;
        padding-top: 85px;
    }

    /* Phone store layout - 2x2 grid */
    .store-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px;
    }
    
    .skin-wrapper {
        width: 100%;
    }
    
    .skin-card {
        width: 100%;
        height: 140px;
        padding: 3px;
    }
    
    .skin-card img {
        width: 90px;
        height: 70px;
    }
    
    .skin-name {
        font-size: 0.75em;
        line-height: 1.2;
    }
    
    .skin-price {
        font-size: 0.7em;
    }
    
    .skin-price::before {
        width: 12px;
        height: 12px;
        margin-right: 3px;
    }
    
    /* Smaller timer and refresh for phones */
    .timer {
        font-size: 1.3em;
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .refresh-icon {
        margin: 15px auto 0;
        width: 28px;
        height: 28px;
    }

    .game-grid {
        grid-template-columns: repeat(4, 60px);
        grid-template-rows: repeat(4, 60px);
    }
    
    .grid-cell {
        width: 60px;
        height: 60px;
    }

    /* Phone responsive for typing game */
    .type-container {
        padding: 15px 10px;
        padding-top: 30px;
    }
    
    .type-text-container {
        height: 90px;
        padding: 12px;
    }
    
    .type-text {
        font-size: 16px;
        line-height: 1.4;
    }
    
    .text-row {
        height: 28px;
    }
    
    .type-cursor {
        height: 20px;
        width: 2px;
    }
    
    .type-input {
        font-size: 16px;
        padding: 10px 12px;
    }
    
    .time-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .type-timer {
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .type-stats {
        padding: 20px;
    }
}

/* Better touch interactions */
@media (hover: none) and (pointer: coarse) {
    .skin-card:hover {
        transform: none;
    }
    
    .grid-cell:hover {
        border-color: #444;
    }
    
    /* Make touch targets larger */
    .nav-link {
        padding: 20px 25px;
    }
    
    .mobile-nav .nav-link {
        padding: 25px;
    }
    
    /* Improve touch targets for mobile */
    .grid-cell {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Landscape orientation fixes */
@media (orientation: landscape) and (max-height: 500px) {
    .home-container {
        height: 100vh;
        padding-top: 70px;
    }
    
    .aim-container {
        padding: 10px;
    }
    
    .aim-header {
        margin-bottom: 15px;
    }
    
    .ascii-text {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .navbar-nav .nav-link[data-page="aim"],
    .navbar-nav .nav-link[data-page="type"],
    .mobile-nav .nav-link[data-page="aim"],
    .mobile-nav .nav-link[data-page="type"] {
        display: none;
    }
}