:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --accent-color: #8b5cf6;
    --accent-hover: #7c3aed;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
}

.container {
    width: 95%;
    max-width: 900px;
    margin: 2rem auto;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header h1 {
    font-size: 2.8rem;
    margin: 0;
    background: linear-gradient(to right, #f472b6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.top-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    border-bottom: 1px solid #334155;
    padding-bottom: 1rem;
}

.top-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.top-nav a:hover {
    color: white;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    main { grid-template-columns: 1fr; }
}

.input-section textarea {
    width: 100%;
    height: 150px;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 14px;
    padding: 1.2rem;
    color: white;
    font-size: 1rem;
    resize: none;
    margin-bottom: 1.2rem;
    box-sizing: border-box;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

button {
    flex: 1;
    min-width: 120px;
    padding: 0.9rem;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.primary-btn { background: var(--accent-color); color: white; }
.primary-btn.stop-btn { background: #ef4444; }
.accent-btn { background: #f472b6; color: white; }
.secondary-btn { background: #334155; color: white; }

.wheel-container {
    position: relative;
    width: 340px;
    height: 340px;
    margin: 0 auto;
}

canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 50px;
    background: #ef4444;
    clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
    z-index: 10;
}

.winner-display {
    margin-bottom: 1.5rem;
    padding: 1.5rem 1rem;
    background: #0f172a;
    border-radius: 16px;
    border: 2px solid #fbbf24;
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#winner-name {
    font-size: 2rem;
    font-weight: 800;
    color: #fbbf24;
}

/* 추가 콘텐츠 스타일 */
.content-article {
    text-align: left;
    border-top: 1px solid #334155;
    padding-top: 2rem;
}

.content-article h2 {
    color: white;
    margin-bottom: 1rem;
}

.content-article p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.feature-item {
    background: #0f172a;
    padding: 1.5rem;
    border-radius: 16px;
}

.feature-item h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: white;
}

footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    font-size: 0.85rem;
    color: #64748b;
}

.footer-links {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.hidden { display: none; opacity: 0; }
