* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 375px;
    height: 812px;
    margin: 0 auto;
    background-color: #fafafa;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}

/* 반응형 크기 조정 */
@media (max-height: 812px) {
    .container {
        height: 100vh;
        width: calc(100vh * 375 / 812);
        max-width: 100vw;
    }
}

@media (max-width: 375px) {
    .container {
        width: 100vw;
        height: calc(100vw * 812 / 375);
        max-height: 100vh;
    }
}

/* 최소 크기 보장 */
@media (max-width: 320px) {
    .container {
        width: 320px;
        height: 693px;
    }
}

/* 최대 크기 제한 */
@media (min-width: 500px) {
    .container {
        width: 500px;
        height: 812px;
    }
}

.screen {
    display: none;
    height: 100%;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

.header {
    background: linear-gradient(135deg, #3333cc, #6666ff);
    color: white;
    padding: 20px;
    text-align: center;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
}

.content {
    flex: 1;
    padding: 0;
	height: 100%;
    display: flex;
    flex-direction: column;
}

.intro-card {
    background: white;
    border-radius: 0;
    padding: 24px;
    margin-top: 0;
    box-shadow: none;
    height: calc(100% - 120px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.intro-card h2 {
    color: #3333cc;
    margin-bottom: 16px;
    font-size: 18px;
}

.intro-card p {
    margin-bottom: 12px;
    color: #666;
}

.intro-card ul {
    margin: 16px 0;
    padding-left: 20px;
}

.intro-card li {
    margin-bottom: 8px;
    color: #666;
}

.gender-card {
    background: white;
    border-radius: 0;
    padding: 24px;
    margin-bottom: 0;
    box-shadow: none;
    height: calc(100% - 120px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.gender-card h2 {
    color: #3333cc;
    margin-bottom: 16px;
    font-size: 18px;
}

.gender-card p {
    margin-bottom: 24px;
    color: #666;
}

.gender-options {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.gender-btn {
    background: #f0f0ff;
    border: none;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.gender-btn:hover {
    background: #e0e0ff;
    transform: translateY(-2px);
}

.gender-btn:active {
    transform: translateY(0);
}

.gender-icon {
    font-size: 32px;
}

.gender-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.question-card {
    background: white;
    border-radius: 0;
    padding: 24px;
    margin-bottom: 0;
    box-shadow: none;
    height: calc(100% - 120px);
    display: flex;
    flex-direction: column;
}

.question-header {
    margin-bottom: 16px;
    flex-shrink: 0;
}

.question-header span {
    color: #6666cc;
    font-size: 12px;
    font-weight: 600;
}

.question-card h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
    line-height: 1.4;
    flex-shrink: 0;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.option-btn {
    background: #f0f0ff;
    border: none;
    border-radius: 8px;
    padding: 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.option-btn:hover {
    background: #e0e0ff;
    transform: translateY(-1px);
}

.option-btn:active {
    transform: translateY(0);
}

.option-label {
    font-weight: 600;
    color: #3333cc;
    min-width: 20px;
}

.option-text {
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
    text-align: left;
}

.progress-container {
    margin-top: 24px;
    padding: 0 24px 24px 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3333cc;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 5%;
}

.result-card {
    background: white;
    border-radius: 0;
    padding: 24px;
    margin-bottom: 0;
    box-shadow: none;
    height: calc(100% - 120px);
    overflow-y: auto;
}

.result-header {
    text-align: center;
    margin-bottom: 24px;
}

.result-header span {
    color: #666;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.result-header h2 {
    color: #3333cc;
    font-size: 28px;
    font-weight: 700;
}

.result-header p {
    color: #666;
    font-size: 14px;
    margin-top: 4px;
}

.result-subtype {
    text-align: center;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f8ff;
    border-radius: 8px;
}

.result-subtype h3 {
    color: #666;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.result-subtype p {
    color: #666;
    font-size: 14px;
}

.result-details h3,
.result-compatibility h3 {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.result-details ul {
    list-style: none;
    margin-bottom: 24px;
}

.result-details li {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
}

.result-details li::before {
    content: "•";
    color: #3333cc;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.result-compatibility p {
    color: #666;
    font-size: 14px;
}

.btn-primary {
    background: #3333cc;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
}

.btn-primary:hover {
    background: #2222aa;
    transform: translateY(0px);
}

.btn-primary:active {
    transform: translateY(0px);
}

/* 작은 화면에서 패딩 조정 */
@media (max-width: 375px) {
    .content {
        padding: 16px;
    }
    
    .question-card,
    .result-card,
    .intro-card,
    .gender-card {
        padding: 20px;
    }
} 