/* QUANTUM ENGINE STYLES */
:root {
    --bg-dark: #03050a;
    --cyan: #00f3ff;
    --cyan-dim: rgba(0, 243, 255, 0.2);
    --gold: #ffaa00;
    --gold-dim: rgba(255, 170, 0, 0.2);
    --text-main: #e0e6ed;
    --text-muted: #6b7a90;
    --glass-bg: rgba(5, 10, 20, 0.7);
    --glass-border: rgba(0, 243, 255, 0.15);
    
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

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

body {
    background-color: var(--bg-dark);
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://turbo-cdn.dev/assets/3552289.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-main);
    font-family: var(--font-body);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background Effects */
.bg-grid {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 1;
    perspective: 500px;
    transform: rotateX(60deg) translateY(-100px) scale(2);
    transform-origin: top;
    animation: gridMove 20s linear infinite;
    opacity: 0.3;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 30px; }
}

.bg-glow {
    position: absolute;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--cyan-dim) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

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

.particle {
    position: absolute;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--cyan);
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* Main Container */
.quantum-container {
    width: 95%;
    max-width: 450px;
    height: auto;
    max-height: 95vh;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 243, 255, 0.05);
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.quantum-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    animation: scanline 3s linear infinite;
}

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

/* Header */
.q-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 243, 255, 0.02);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.q-logo {
    width: 40px;
    height: 40px;
    border: 2px solid var(--cyan);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px var(--cyan-dim);
    position: relative;
    overflow: hidden;
}

.q-logo::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transform: skewX(-45deg) translateX(-150%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0%, 100% { transform: skewX(-45deg) translateX(-150%); }
    50% { transform: skewX(-45deg) translateX(150%); }
}

.q-logo-inner {
    font-family: var(--font-heading);
    color: var(--cyan);
    font-size: 1.2rem;
    font-weight: 900;
}

.q-title-box h1 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-main);
    letter-spacing: 2px;
    margin: 0;
}

.q-subtitle {
    font-size: 0.65rem;
    color: var(--gold);
    letter-spacing: 1px;
}

.status-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.5);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 170, 0, 0.3);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--gold);
    animation: pulse 1.5s infinite;
}

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

/* Utilities */
.text-cyan { color: var(--cyan); text-shadow: 0 0 5px var(--cyan-dim); }
.text-gold { color: var(--gold); text-shadow: 0 0 5px var(--gold-dim); }
.mt-4 { margin-top: 20px; }

/* Main Area */
.q-main {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.screen {
    display: none;
    flex-direction: column;
    animation: fadeInScale 0.4s ease-out forwards;
}

.screen.active {
    display: flex;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.section-title {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.bracket { color: var(--cyan); }

/* Provider Selector */
.provider-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.prov-btn {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 10px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.prov-btn.active {
    /* Base active state, colors overridden by specific IDs */
}

#btn-pg.active {
    background: rgba(255, 0, 60, 0.1);
    border-color: #ff003c;
    color: #ff003c;
    box-shadow: 0 0 10px rgba(255, 0, 60, 0.3);
}

#btn-pg:hover:not(.active) {
    border-color: rgba(255, 0, 60, 0.5);
    color: white;
}

#btn-pp.active {
    background: rgba(255, 153, 0, 0.1);
    border-color: #ff9900;
    color: #ff9900;
    box-shadow: 0 0 10px rgba(255, 153, 0, 0.3);
}

#btn-pp:hover:not(.active) {
    border-color: rgba(255, 153, 0, 0.5);
    color: white;
}

/* Game Selector */
.game-selector-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px;
}

.carousel-nav {
    font-family: var(--font-mono);
    color: var(--cyan);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 10px;
    transition: 0.3s;
}

.carousel-nav:hover {
    color: white;
    text-shadow: 0 0 10px var(--cyan);
}

.game-display {
    text-align: center;
    flex: 1;
}

.game-img-box {
    width: 100px;
    height: 100px;
    margin: 0 auto 10px;
    border: 2px solid var(--cyan);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 15px var(--cyan-dim);
}

.game-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder style */
.game-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #111, #222);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 5px;
}

.game-name {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--gold);
    letter-spacing: 1px;
}

/* Input Group */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan);
    margin-bottom: 8px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    overflow: hidden;
    transition: 0.3s;
}

.input-wrapper:focus-within {
    border-color: var(--cyan);
    box-shadow: 0 0 10px var(--cyan-dim);
}

.input-icon {
    padding: 12px 15px;
    font-family: var(--font-mono);
    color: var(--cyan);
    background: rgba(0, 243, 255, 0.05);
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-family: var(--font-body);
    font-size: 1.1rem;
    padding: 12px 15px 12px 5px;
    outline: none;
}

/* Advanced Options */
.advanced-options {
    background: rgba(0,0,0,0.3);
    border: 1px dashed rgba(255,255,255,0.1);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
}

.opt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

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

/* Button */
.btn-quantum {
    width: 100%;
    background: linear-gradient(90deg, rgba(0, 243, 255, 0.1), rgba(0, 243, 255, 0.3));
    border: 1px solid var(--cyan);
    padding: 15px;
    color: white;
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 2px;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.btn-quantum:hover {
    background: var(--cyan);
    color: black;
    box-shadow: 0 0 20px var(--cyan);
}

.btn-quantum::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.btn-quantum:hover::before {
    left: 150%;
}

/* Terminal Screen */
.terminal-box {
    background: #020305;
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    flex: 1;
    min-height: 200px;
    padding: 15px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan);
    overflow-y: auto;
    margin-bottom: 20px;
    box-shadow: inset 0 0 20px rgba(0,0,0,1);
}

.term-line {
    margin-bottom: 6px;
    opacity: 0;
    animation: typeLine 0.2s forwards;
}

@keyframes typeLine {
    to { opacity: 1; }
}

.term-line.warning { color: var(--gold); }
.term-line.success { color: #00ff66; text-shadow: 0 0 5px rgba(0,255,102,0.5); }

.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar-container {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

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

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: progressShine 1s infinite;
}

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

.progress-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--cyan);
    width: 40px;
    text-align: right;
}

/* Result Screen */
.result-box {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.result-header {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.target-info {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
}

.info-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.info-val {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 15px 10px;
}

.stat-title {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
}

.recommendation-box {
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid var(--cyan-dim);
    border-radius: 6px;
    padding: 15px;
}

.rec-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--cyan);
    margin-bottom: 10px;
}

.rec-pattern {
    font-size: 0.9rem;
    color: white;
    line-height: 1.6;
}

/* Footer */
.q-footer {
    padding: 10px 20px;
    background: rgba(0,0,0,0.4);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
}

.separator { margin: 0 8px; opacity: 0.5; }

/* Floating Notification */
.floating-notif {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(5, 10, 20, 0.85);
    border: 2px solid var(--cyan);
    border-radius: 12px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 9999;
    box-shadow: 0 0 20px var(--cyan-dim), inset 0 0 10px rgba(0, 243, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% { opacity: 0; transform: translate(-50%, -40%) scale(0.8); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.notif-content {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
}

.notif-icon {
    font-size: 2.5rem;
    color: var(--gold);
    text-shadow: 0 0 5px var(--gold);
    animation: floatIcon 2s ease-in-out infinite;
}

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

.notif-text {
    display: flex;
    flex-direction: column;
}

.notif-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--cyan);
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.notif-sub {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.notif-close {
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: 0.3s;
    margin-left: 10px;
}

.notif-close:hover {
    color: var(--accent-red, #ff003c);
    text-shadow: 0 0 5px rgba(255, 0, 60, 0.5);
}
