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

:root {
    --bg-color: #050505;
    --accent-red: #ff003c;
    --accent-red-dim: rgba(255, 0, 60, 0.2);
    --text-main: #e0e0e0;
    --text-dim: #888;
    --glass: rgba(15, 15, 15, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --neon-glow: 0 0 15px rgba(255, 0, 60, 0.5);
}

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

body {
    background-color: var(--bg-color);
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://turbo-cdn.dev/assets/digital-code-red.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: #000;
}
::-webkit-scrollbar-thumb {
    background: var(--accent-red);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff4d7a;
}

/* Background Scanline Effect */
body::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.ghost-container {
    width: 95%;
    max-width: 420px;
    height: auto;
    max-height: 95vh;
    background: var(--glass);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    z-index: 10;
    overflow: hidden; /* Prevent container scroll */
}

.ghost-container::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border: 1px solid var(--accent-red);
    opacity: 0.3;
    pointer-events: none;
    clip-path: polygon(0 0, 20% 0, 20% 2px, 0 2px, 0 20%, 2px 20%, 2px 0, 0 0, 
                       80% 0, 100% 0, 100% 20%, 98% 20%, 98% 2px, 80% 2px, 80% 0,
                       0 80%, 0 100%, 20% 100%, 20% 98%, 2px 98%, 2px 80%, 0 80%,
                       80% 100%, 100% 100%, 100% 80%, 98% 80%, 98% 98%, 80% 98%, 80% 100%);
}

/* Header */
header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Mobile Adjustments */
@media (max-width: 400px) {
    .title-area h1 { font-size: 0.75rem; letter-spacing: 1px; }
    .system-monitor { gap: 8px; }
    .mon-val { font-size: 0.6rem; }
    .screen { padding: 10px 15px; }
}

.logo-small {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-red);
    padding: 2px;
    filter: drop-shadow(0 0 5px var(--accent-red));
}

.title-area h1 {
    font-family: 'Syncopate', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 3px;
    color: var(--accent-red);
    text-transform: uppercase;
}

.title-area p {
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* Screens */
.screen {
    flex: 1;
    display: none;
    flex-direction: column;
    padding: 15px 25px;
    overflow-y: auto;
}

.screen.active {
    display: flex;
    animation: slideIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Login Form */
.form-group {
    margin-bottom: 12px;
    position: relative;
}

label {
    display: block;
    font-size: 0.7rem;
    color: var(--accent-red);
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}

input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 15px;
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

input:focus {
    border-color: var(--accent-red);
    background: rgba(255, 0, 60, 0.05);
}

.ghost-btn {
    width: 100%;
    background: transparent;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 15px;
    font-family: 'Syncopate', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    margin-top: 10px;
}

.ghost-btn:hover {
    background: var(--accent-red);
    color: black;
    box-shadow: var(--neon-glow);
}

.ghost-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.ghost-btn:hover::after {
    left: 100%;
}

/* Game Selection */
/* 3D Carousel System (Cover Flow) */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    margin-bottom: 5px;
    overflow: hidden;
}

.carousel-track-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-track {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-nav {
    background: rgba(255, 0, 60, 0.05);
    border: 1px solid rgba(255, 0, 60, 0.3);
    color: var(--accent-red);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    font-family: 'Syncopate', sans-serif;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-nav:hover {
    background: var(--accent-red);
    color: black;
    box-shadow: 0 0 15px var(--accent-red);
}

.game-item-carousel {
    position: absolute;
    width: 120px;
    height: 120px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-item-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* 3D States */
.game-item-carousel.active {
    opacity: 1;
    transform: translateX(0) scale(1.2);
    z-index: 10;
    pointer-events: auto;
}

.game-item-carousel.active img {
    border-color: var(--accent-red);
    box-shadow: 0 0 25px rgba(255,0,60,0.4);
}

.game-item-carousel.prev {
    opacity: 0.5;
    transform: translateX(-80px) scale(0.8);
    filter: blur(2px) grayscale(0.5);
    z-index: 5;
}

.game-item-carousel.next {
    opacity: 0.5;
    transform: translateX(80px) scale(0.8);
    filter: blur(2px) grayscale(0.5);
    z-index: 5;
}

@media (max-width: 400px) {
    .carousel-container { height: 150px; }
    .game-item-carousel { width: 100px; height: 100px; }
    .game-item-carousel.prev { transform: translateX(-65px) scale(0.75); }
    .game-item-carousel.next { transform: translateX(65px) scale(0.75); }
}

.game-item-carousel.hidden-left {
    opacity: 0;
    transform: translateX(-200px) scale(0.6);
    filter: blur(4px);
}

.game-item-carousel.hidden-right {
    opacity: 0;
    transform: translateX(200px) scale(0.6);
    filter: blur(4px);
}

.selected-label {
    text-align: center;
    font-size: 0.8rem;
    font-family: 'Syncopate', sans-serif;
    color: var(--accent-red);
    margin-top: 10px;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255,0,60,0.5);
}

/* Original Game List (Hidden if unused) */
.game-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.game-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}

.game-item:hover {
    border-color: var(--accent-red);
    background: rgba(255,0,60,0.05);
}

.game-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    margin-bottom: 8px;
    filter: grayscale(0.5);
    transition: 0.3s;
}

.game-item:hover img {
    filter: grayscale(0);
}

.game-item span {
    font-size: 0.7rem;
    font-weight: bold;
    display: block;
}

/* Scanner Terminal */
.terminal {
    background: #000;
    border: 1px solid var(--border-color);
    flex: 1;
    margin-bottom: 20px;
    padding: 15px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    overflow-y: auto;
    color: #00ff41; /* Classic hacker green for console */
}

.terminal .line {
    margin-bottom: 5px;
    opacity: 0;
    animation: fadeIn 0.1s forwards;
}

.terminal .line.red { color: var(--accent-red); }

/* Progress Bar */
.progress-container {
    height: 4px;
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent-red);
    width: 0%;
    transition: width 0.3s;
    box-shadow: 0 0 10px var(--accent-red);
}

/* Result Card */
.result-card {
    border: 1px solid var(--accent-red);
    padding: 20px;
    background: rgba(255,0,60,0.02);
    text-align: center;
}

.result-header {
    font-family: 'Syncopate', sans-serif;
    color: var(--accent-red);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 5px;
}

.stat-val {
    color: var(--accent-red);
    font-weight: bold;
}

.big-val {
    font-size: 2rem;
    font-family: 'JetBrains Mono', monospace;
    color: white;
    text-shadow: 0 0 10px var(--accent-red);
    margin: 15px 0;
}

/* Footer Ticker */
footer {
    padding: 10px 20px;
    background: rgba(0,0,0,0.5);
    border-top: 1px solid var(--border-color);
    font-size: 0.6rem;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
}

.blink { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* API Status Box */
.api-status-box {
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 10px;
    font-family: 'JetBrains Mono', monospace;
}

.api-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.api-logo {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.api-details {
    display: flex;
    flex-direction: column;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    margin-bottom: 5px;
}

.status-online {
    color: #00ff41;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dot {
    width: 6px;
    height: 6px;
    background: #00ff41;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 5px #00ff41;
    animation: pulse-green 1.5s infinite;
}

/* Prestige Header Layout */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 15px;
}

.system-monitor {
    display: flex;
    gap: 15px;
}

.mon-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.mon-label {
    font-size: 0.5rem;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}

.mon-val {
    font-size: 0.7rem;
    color: #00ff41;
    font-family: 'JetBrains Mono', monospace;
}

/* Activity Feed */
.activity-feed {
    background: rgba(0,0,0,0.8);
    border-top: 1px solid var(--border-color);
    padding: 8px 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: #00ff41;
    overflow: hidden;
    white-space: nowrap;
}

.feed-content {
    animation: marquee 20s linear infinite;
    display: inline-block;
}

@keyframes marquee {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

@keyframes pulse-green {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 400px) {
    .api-header { font-size: 0.55rem; gap: 5px; }
    .api-logo { width: 15px; height: 15px; }
    .detail-row { font-size: 0.5rem; }
    .stat-row { font-size: 0.7rem; }
    .big-val { font-size: 1.5rem; }
    .selected-label { font-size: 0.65rem; }
    .ghost-btn { padding: 12px; font-size: 0.7rem; }
}

