:root {
    --bg-dark: #02040a;
    --panel-bg: #0d1117;
    --border-tech: #30363d;
    --accent-blue: #58a6ff;
    --accent-green: #3fb950;
    --accent-neon: #00ff41;
    --text-muted: #8b949e;
    --text-bright: #c9d1d9;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-bright);
    font-family: 'Share Tech Mono', 'Malgun Gothic', sans-serif;
    overflow-y: auto;
    min-height: 100vh;
}

.dashboard {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.main-header {
    height: 60px;
    background: #161b22;
    border-bottom: 1px solid var(--border-tech);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

h1 { font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; letter-spacing: 2px; line-height: 1; }
.highlight { color: var(--accent-blue); }
.version { font-size: 0.7rem; color: var(--text-muted); vertical-align: super; }
.tagline { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; }

.system-status { display: flex; align-items: center; gap: 8px; font-size: 0.7rem; }
.status-label { color: var(--text-muted); }
.status-value { color: var(--accent-neon); font-weight: bold; }

.pulse { animation: pulse-animation 2s infinite; }
@keyframes pulse-animation {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Layout Grid */
.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    flex: 1;
}

/* Left Canvas */
.canvas-area {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.monitor {
    background: var(--panel-bg);
    border: 1px solid var(--border-tech);
    border-radius: 6px;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.screen-header {
    background: #21262d;
    padding: 8px 15px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-tech);
}

.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.green { background: var(--accent-green); box-shadow: 0 0 5px var(--accent-green); }

.result-display {
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 200px;
}

.ball-container { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    padding: 10px 0;
    width: 100%;
    align-items: center;
}

.result-row {
    display: flex; 
    flex-direction: row; 
    gap: 8px; 
    justify-content: center;
    align-items: center;
    padding: 12px 5px; 
    border-bottom: 1px solid rgba(88, 166, 255, 0.1);
    width: 100%;
    max-width: 400px;
}

.ball, .mini-ball {
    width: 46px; height: 46px; border: 2px solid var(--accent-blue);
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 1.2rem; font-weight: bold; font-family: 'Rajdhani', sans-serif;
    color: var(--accent-blue); box-shadow: 0 0 10px rgba(88, 166, 255, 0.2);
    flex-shrink: 0;
}

.mini-ball {
    width: 38px; height: 38px; border-width: 1.5px;
    font-size: 1rem;
}

.probability-box {
    text-align: center; padding: 15px 0; border-top: 1px solid var(--border-tech);
}
.prob-label { font-size: 0.7rem; color: var(--text-muted); }
.prob-value { font-size: 1.5rem; color: var(--accent-neon); }

/* History Panel */
.history-panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-tech);
    border-radius: 6px;
    margin-top: 10px;
}

.panel-header-sm {
    background: #21262d;
    padding: 8px 15px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.history-table {
    padding: 10px;
    font-size: 0.75rem;
    color: var(--text-bright);
}

.history-row {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    border-bottom: 1px dashed #333;
}

/* Ad & Footer */
.ad-banner-bottom {
    background: #161b22;
    border: 1px solid var(--border-tech);
    margin: 15px 0;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.canvas-footer {
    margin-top: 20px;
    padding: 20px;
    border-top: 1px solid var(--border-tech);
    text-align: center;
}

.ad-placeholder {
    background: #161b22;
    height: 90px;
    border: 1px dashed var(--border-tech);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    color: #444;
    margin-bottom: 15px;
}

.legal-notice {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.share-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: #fee500;
    color: #3c1e1e;
}

/* Overlay & Progress */
.ad-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 4, 10, 0.95);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.overlay-content {
    width: 90%;
    max-width: 600px;
    text-align: center;
}

.progress-container {
    width: 100%;
    height: 4px;
    background: #161b22;
    margin-top: 20px;
}
.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--accent-blue);
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-content {
    background: var(--panel-bg);
    border: 1px solid var(--accent-blue);
    width: 90%;
    max-width: 400px;
    padding: 20px;
    border-radius: 8px;
}

/* Terminal */
.terminal {
    background: #000;
    border: 1px solid var(--border-tech);
    height: 150px;
    display: flex;
    flex-direction: column;
}
.terminal-header { background: #161b22; padding: 5px 10px; color: var(--text-muted); font-size: 0.7rem; }
.log-content { padding: 10px; flex: 1; overflow-y: auto; color: var(--accent-neon); font-size: 0.75rem; }

/* Filter Panel */
.filter-panel {
    background: #161b22;
    border-left: 1px solid var(--border-tech);
    display: flex;
    flex-direction: column;
}
.panel-header { padding: 15px; border-bottom: 1px solid var(--border-tech); font-weight: bold; color: var(--accent-blue); display: flex; justify-content: space-between; }
.filter-scroll { flex: 1; overflow-y: auto; padding: 15px; }
.filter-category h3 { font-size: 0.7rem; color: var(--text-muted); margin: 15px 0 10px; }
.filter-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.f-name { font-size: 0.75rem; }

/* Switch Style */
.switch { position: relative; display: inline-block; width: 34px; height: 18px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #333; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 12px; width: 12px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent-green); }
input:checked + .slider:before { transform: translateX(16px); }

/* Buttons */
.main-controls { padding: 20px; border-top: 1px solid var(--border-tech); }
.combo-btns { display: flex; gap: 5px; margin-bottom: 10px; }
.qty-btn { flex: 1; padding: 10px; background: #21262d; border: 1px solid var(--border-tech); color: #fff; cursor: pointer; }
.qty-btn.active { background: var(--accent-blue); color: #000; }
.cyber-btn { width: 100%; padding: 15px; background: none; border: 1px solid var(--accent-blue); color: var(--accent-blue); cursor: pointer; font-family: 'Share Tech Mono'; letter-spacing: 2px; }

/* Responsive */
@media (max-width: 900px) {
    .main-content { grid-template-columns: 1fr; }
    .filter-panel { border-left: none; border-top: 1px solid var(--border-tech); }
    .ball { width: 40px; height: 40px; font-size: 1rem; }
}
