:root {
    --primary-bg: #0f172a;
    --card-bg: #1e293b;
    --sidebar-bg: #1e293b;
    --accent: #fbbf24; /* Gold */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #22c55e;
}

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

body {
    font-family: 'Pretendard', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-main);
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #334155;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 3rem;
}

nav ul {
    list-style: none;
}

nav ul li {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

nav ul li.active, nav ul li:hover {
    background: #334155;
    color: var(--text-main);
}

nav ul li i {
    margin-right: 10px;
}

/* Main Content */
.content {
    flex: 1;
    padding: 3rem;
    overflow-y: auto;
}

.main-header {
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.main-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.last-draw-info {
    text-align: right;
}

.badge {
    background: #334155;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 10px;
    display: inline-block;
}

.small-balls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.s-ball {
    width: 28px;
    height: 28px;
    background: #475569;
    border-radius: 50%;
    font-size: 0.75rem;
    display: grid;
    place-items: center;
}

.bonus-ball { background: #64748b; }

/* Analysis Cards */
.analysis-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.analysis-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 24px;
    position: relative;
    border: 1px solid #334155;
}

.analysis-card.primary {
    border: 1px solid var(--accent);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.1);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.analysis-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.analysis-card .desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Best Pick Display */
.best-pick-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 2.5rem 0;
}

.ball {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #475569, #1e293b);
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Ball Colors */
.b-1 { background: radial-gradient(circle at 30% 30%, #facc15, #854d0e); }
.b-2 { background: radial-gradient(circle at 30% 30%, #38bdf8, #075985); }
.b-3 { background: radial-gradient(circle at 30% 30%, #f87171, #991b1b); }
.b-4 { background: radial-gradient(circle at 30% 30%, #94a3b8, #334155); }
.b-5 { background: radial-gradient(circle at 30% 30%, #4ade80, #166534); }

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.glow-btn {
    width: 100%;
    padding: 15px;
    background: var(--accent);
    color: #451a03;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.glow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6);
}

/* Stats Panel */
.stats-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #334155;
}

.stat-card h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.stat-bar {
    height: 10px;
    background: #334155;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.bar {
    height: 100%;
    background: var(--accent);
    transition: width 1s ease-in-out;
}

.stat-val {
    font-size: 2rem;
    font-weight: bold;
    color: var(--success);
}

.pattern-log {
    background: #020617;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent);
}

.pattern-log h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.pattern-log ul {
    list-style: none;
}

.pattern-log li {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pattern-log li i { color: var(--success); }

.loading-shimmer {
    font-style: italic;
    color: var(--text-muted);
}
