:root {
    --primary: #d97706;
    --bg: #fffbeb;
    --card: #ffffff;
    --text: #451a03;
    --group-bg: #ef4444;
}

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: #92400e;
}

.digits {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.digit {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 1.125rem;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.group-digit {
    background: var(--group-bg);
    color: white;
    border: none;
}

.separator {
    font-weight: bold;
    color: #cbd5e1;
    margin: 0 0.1rem;
}

.copy-btn {
    background: #fef3c7;
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    color: #92400e;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #fde68a;
    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: #fef3c7;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: #92400e;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-copy-all:hover {
    background: #fde68a;
    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(217, 119, 6, 0.3);
    transition: all 0.2s;
}

.btn-server {
    background: #92400e;
}

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

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

.link-home {
    color: #92400e;
    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(69, 26, 3, 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;
}

@media (max-width: 480px) {
    .digit {
        width: 1.8rem;
        height: 1.8rem;
        font-size: 1rem;
    }

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