:root {
    --bg-dark: #0f0c29;
    --bg-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    --primary-neon: #00f260;
    --secondary-neon: #0575e6;
    --accent-pink: #ec38bc;
    --accent-purple: #7303c0;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    --font-main: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.circles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background: var(--bg-gradient);
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-purple);
    top: -100px;
    left: -100px;
}

.circle-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-neon);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.circle-3 {
    width: 250px;
    height: 250px;
    background: var(--accent-pink);
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

.game-container {
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.back-button svg {
    width: 20px;
    height: 20px;
}

.back-button:hover {
    color: var(--primary-neon);
    background: rgba(0, 242, 96, 0.1);
}

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

.logo-wrapper {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary-neon), var(--accent-purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-5deg);
    box-shadow: 0 0 20px rgba(115, 3, 192, 0.5);
}

.logo-text {
    font-weight: 800;
    font-size: 1.5rem;
}

.brand-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.5px;
}

.badge {
    font-size: 0.7rem;
    background: var(--primary-neon);
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    letter-spacing: 1px;
}

.btn-reset {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-reset:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: var(--text-main);
}

.game-grid {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 20px;
    flex: 1;
    min-height: 0; 
}

.console-panel {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border-radius: 24px;
    border: 1px solid var(--card-border);
    padding: 25px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--card-border);
}

.panel-header h2 {
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.blue-glow::before { background: var(--secondary-neon); }
.pink-glow::before { background: var(--accent-pink); }

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.max-val {
    font-size: 1rem;
    color: var(--text-muted);
}

.circular-progress {
    width: 60px;
    height: 60px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3.8;
}

.circle-fill {
    fill: none;
    stroke: var(--accent-pink);
    stroke-width: 3.8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.main-panel {
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.game-display {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.input-label {
    font-size: 0.9rem;
    letter-spacing: 3px;
    color: var(--primary-neon);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 242, 96, 0.4);
}

.neon-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--card-border);
    border-radius: 20px;
    font-size: 5rem;
    color: white;
    text-align: center;
    font-family: var(--font-main);
    padding: 20px;
    transition: all 0.3s;
}

.neon-input:focus {
    outline: none;
    border-color: var(--secondary-neon);
    box-shadow: 0 0 30px rgba(5, 117, 230, 0.3);
}

.neon-input::placeholder {
    color: rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background: linear-gradient(90deg, var(--secondary-neon), var(--accent-purple));
    color: white;
    border: none;
    padding: 18px;
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 15px;
    cursor: pointer;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
    box-shadow: 0 10px 30px rgba(115, 3, 192, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 15px 40px rgba(115, 3, 192, 0.5);
}

.btn-primary:active {
    transform: scale(0.98);
}

.feedback-display {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-msg {
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feedback-msg.warning {
    background: rgba(236, 56, 188, 0.15);
    color: var(--accent-pink);
    border: 1px solid rgba(236, 56, 188, 0.3);
    box-shadow: 0 0 20px rgba(236, 56, 188, 0.15);
}

.feedback-msg.success {
    background: rgba(0, 242, 96, 0.15);
    color: var(--primary-neon);
    border: 1px solid rgba(0, 242, 96, 0.3);
    box-shadow: 0 0 20px rgba(0, 242, 96, 0.2);
}

.feedback-msg.error {
    background: rgba(255, 82, 82, 0.15);
    color: #ff5252;
    border: 1px solid rgba(255, 82, 82, 0.3);
}

.feedback-placeholder {
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.5;
}

.hint-display {
    color: var(--secondary-neon);
    font-weight: 600;
    font-size: 0.9rem;
    min-height: 20px;
}

.live-indicator {
    background: #ff0000;
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    animation: blink 2s infinite;
}

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

.history-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.custom-scroll::-webkit-scrollbar {
    width: 5px;
}
.custom-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
.custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid transparent;
    animation: slideLeft 0.3s ease;
}

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

.history-item.high { border-left-color: var(--accent-pink); }
.history-item.low { border-left-color: var(--secondary-neon); }
.history-item.win { border-left-color: var(--primary-neon); background: rgba(0, 242, 96, 0.05); }

.h-guess {
    font-weight: 700;
    font-size: 1.2rem;
}
.h-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.empty-log {
    text-align: center;
    color: var(--text-muted);
    margin-top: 50px;
}
.log-icon { font-size: 2rem; display: block; margin-bottom: 10px; opacity: 0.5; }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 12, 41, 0.9);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(20px);
}

.modal-overlay.show { display: flex; }

.result-card-3d {
    width: 400px;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 30px;
    padding: 5px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-inner {
    background: var(--bg-dark);
    border-radius: 25px;
    padding: 40px;
    text-align: center;
}
