:root {
    --primary: #2563eb;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --ball-1: #facc15; /* 1-10 */
    --ball-11: #60a5fa; /* 11-20 */
    --ball-21: #f87171; /* 21-30 */
    --ball-31: #94a3b8; /* 31-40 */
    --ball-41: #4ade80; /* 41-45 */
}

body {
    font-family: 'Pretendard', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    max-width: 42rem;
    margin: 2rem auto;
    padding: 0 1rem;
    line-height: 1.6;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.game-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.game-card {
    background: var(--card);
    padding: 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s;
    max-width: 30rem;
    width: 100%;
    margin: 0 auto;
}

.game-card:hover {
    transform: translateY(-2px);
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.game-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.balls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ball {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-size: 1rem;
    box-shadow: inset -3px -3px 6px rgba(0, 0, 0, 0.2), 3px 3px 8px rgba(0, 0, 0, 0.1);
}

.copy-btn {
    background: #f1f5f9;
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.copy-all-container {
    display: flex;
    justify-content: flex-end;
    max-width: 30rem;
    width: 100%;
    margin: 0 auto 0.5rem auto;
}

.btn-copy-all {
    background: #e2e8f0;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-copy-all:hover {
    background: #cbd5e1;
    color: var(--primary);
}

.actions {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.btn-group {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    max-width: 28rem;
}

.btn-generate {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
    transition: all 0.2s;
}

.btn-server {
    background: #64748b;
}

.btn-generate:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

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

.link-home {
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
}

.link-home:hover {
    text-decoration: underline;
}

/* 토스트 알림 */
.toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(30, 41, 59, 0.9);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    white-space: pre-line;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 볼 색상 정의 */
.b-1 { background: var(--ball-1); }
.b-11 { background: var(--ball-11); }
.b-21 { background: var(--ball-21); }
.b-31 { background: var(--ball-31); }
.b-41 { background: var(--ball-41); }

@media (max-width: 480px) {
    .ball {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }

    .game-card {
        padding: 1rem;
    }
}
