:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --glass: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

body {
    background: radial-gradient(circle at top left, #1e1b4b, #0f172a);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 90%;
    max-width: 600px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

.title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.game-area {
    display: none;
}

.history {
    height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bubble {
    padding: 0.75rem 1.25rem;
    border-radius: 16px;
    max-width: 80%;
    line-height: 1.5;
}

.user-bubble {
    background: var(--primary);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-bubble {
    background: rgba(255, 255, 255, 0.1);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.timer-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

#timer-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, #ef4444, #f59e0b, #10b981);
    transition: width 0.1s linear;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: white;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--primary);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    margin-top: 1rem;
    width: 100%;
}

.auth-area {
    text-align: center;
    padding: 2rem 0;
}

#login-btn {
    display: flex;
    justify-content: center;
}

/* 스크롤바 디자인 */
.history::-webkit-scrollbar {
    width: 6px;
}
.history::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* 커스텀 모달 스타일 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--glass);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    max-width: 400px;
    width: 80%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-message {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-btn {
    background: var(--primary);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    cursor: pointer;
}
