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

:root {
    --bg: #0f0f13;
    --surface: #1a1a24;
    --surface2: #23233a;
    --border: #2a2a40;
    --text: #e0e0e8;
    --text2: #8888a0;
    --accent: #6c5ce7;
    --green: #00b894;
    --red: #e17055;
    --yellow: #fdcb6e;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    margin-bottom: 32px;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 { font-size: 1.4rem; }
header h1 a { color: var(--text); }

nav a {
    color: var(--text2);
    margin-left: 24px;
    font-size: 0.9rem;
    transition: color 0.2s;
}
nav a:hover { color: var(--text); text-decoration: none; }

.page-title {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.page-desc {
    color: var(--text2);
    margin-bottom: 32px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
}

th, td { padding: 14px 16px; text-align: left; }
th { background: var(--surface2); color: var(--text2); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
tr { border-bottom: 1px solid var(--border); }
tr:last-child { border-bottom: none; }
tr:hover { background: var(--surface2); }

.rank { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.accuracy { font-weight: 700; font-size: 1.1rem; }
.accuracy.high { color: var(--green); }
.accuracy.mid { color: var(--yellow); }
.accuracy.low { color: var(--red); }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}
.badge-correct { background: rgba(0,184,148,0.15); color: var(--green); }
.badge-wrong { background: rgba(225,112,85,0.15); color: var(--red); }
.badge-pending { background: rgba(253,203,110,0.15); color: var(--yellow); }

/* Cards */
.card {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.card h3 { margin-bottom: 8px; }
.card .meta { color: var(--text2); font-size: 0.85rem; }

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.profile-stats {
    display: flex;
    gap: 32px;
}

.stat { text-align: center; }
.stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-label { font-size: 0.8rem; color: var(--text2); }

/* Forms */
.form-section {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.form-section h2 { margin-bottom: 16px; font-size: 1.2rem; }

label { display: block; margin-bottom: 4px; font-size: 0.85rem; color: var(--text2); }
input, select, textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 12px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

button, .btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}
button:hover, .btn:hover { opacity: 0.85; }

.form-row { display: flex; gap: 12px; }
.form-row > div { flex: 1; }

.truncate {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prediction-list { list-style: none; }
.prediction-list li {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.prediction-list li:last-child { border-bottom: none; }

.flash {
    background: rgba(108,92,231,0.15);
    color: var(--accent);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text2);
    font-size: 0.8rem;
}
