:root {
    /* 라이트 모드 색상 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --accent-teto: #ff6b6b;
    --accent-egen: #ff9ff3;
    --border-color: #e9ecef;
    --shadow: rgba(0, 0, 0, 0.1);
    --button-bg: #007bff;
    --button-hover: #0056b3;
}

[data-theme="dark"] {
    /* 다크 모드 색상 */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-teto: #ff8a8a;
    --accent-egen: #ffb3ff;
    --border-color: #404040;
    --shadow: rgba(255, 255, 255, 0.1);
    --button-bg: #0d6efd;
    --button-hover: #0b5ed7;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: all 0.3s ease;
}

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

/* 헤더 */
header {
    background: var(--bg-secondary);
    padding: 1rem 0;
    box-shadow: 0 2px 10px var(--shadow);
    position: relative;
}

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

.header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

h1 {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.theme-toggle, .language-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 12px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.theme-toggle:hover, .language-toggle:hover {
    transform: scale(1.1);
    border-color: var(--button-bg);
}

.language-toggle {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 45px;
}

/* 메인 컨테이너 */
main {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

/* 화면 전환 */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 시작 화면 */
.intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.intro h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-teto), var(--accent-egen));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro > p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* 성격 유형 카드 */
.personality-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.type-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease;
}

.type-card:hover {
    transform: translateY(-5px);
}

.type-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.type-card:first-child h3 {
    color: var(--accent-teto);
}

.type-card:last-child h3 {
    color: var(--accent-egen);
}

/* 성별 선택 */
.gender-selection {
    margin-bottom: 3rem;
}

.gender-selection h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.gender-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.gender-btn {
    padding: 1rem 2rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.gender-btn:hover {
    border-color: var(--button-bg);
    transform: translateY(-2px);
}

.gender-btn.selected {
    background: var(--button-bg);
    color: white;
    border-color: var(--button-bg);
}

/* 버튼 스타일 */
.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--button-bg);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--button-hover);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--button-bg);
    color: var(--button-bg);
}

/* 테스트 화면 */
.test-container {
    max-width: 600px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-teto), var(--accent-egen));
    width: 0%;
    transition: width 0.3s ease;
}

.question-counter {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.question-card {
    background: var(--bg-secondary);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow);
    text-align: center;
}

.question-card h3 {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    line-height: 1.5;
}

.answer-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.answer-btn {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.answer-btn:hover {
    border-color: var(--button-bg);
    background: var(--button-bg);
    color: white;
    transform: translateX(5px);
}

/* 결과 화면 */
.result-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.result-container h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.result-type {
    background: var(--bg-secondary);
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px var(--shadow);
}

.result-type h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

#result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-description {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: left;
    box-shadow: 0 5px 20px var(--shadow);
}

.result-description h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.result-stats {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px var(--shadow);
}

.stat {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat:last-child {
    margin-bottom: 0;
}

.stat-label {
    min-width: 80px;
    font-weight: 600;
}

.stat-bar {
    flex: 1;
    height: 20px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

.stat-fill.teto {
    background: var(--accent-teto);
}

.stat-fill.egen {
    background: var(--accent-egen);
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 푸터 */
footer {
    background: var(--bg-secondary);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .intro h2 {
        font-size: 2rem;
    }
    
    .personality-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gender-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .stat {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .stat-label {
        min-width: auto;
    }
} 