/* 다크모드 변수 */
:root {
    --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-secondary: white;
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: #e9ecef;
    --shadow: rgba(0,0,0,0.1);
    --card-bg: white;
    --button-bg: #f8f9fa;
    --button-hover: #e9ecef;
}

[data-theme="dark"] {
    --bg-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --bg-secondary: #0f3460;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --border-color: #2d3748;
    --shadow: rgba(0,0,0,0.3);
    --card-bg: #1a202c;
    --button-bg: #2d3748;
    --button-hover: #4a5568;
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    position: relative;
    padding-top: 80px;
    padding-left: 80px;
    padding-right: 80px;
}

.header-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.1);
    padding: 8px 12px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.language-selector {
    position: relative;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px var(--shadow);
    display: none;
    flex-direction: column;
    min-width: 150px;
    z-index: 1000;
    margin-top: 5px;
}

.language-selector:hover .language-dropdown {
    display: flex;
}

.lang-option {
    padding: 10px 15px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary);
    transition: background 0.3s ease;
}

.lang-option:hover {
    background: var(--button-hover);
}

/* 모바일 환경 최적화 */
@media (max-width: 768px) {
    .header-controls {
        position: fixed;
        top: 15px;
        right: 15px;
        gap: 8px;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.1);
        padding: 5px;
        border-radius: 10px;
        backdrop-filter: blur(10px);
        border: none;
    }

    .control-btn {
        padding: 8px 10px;
        font-size: 1rem;
        border-radius: 8px;
        min-width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .language-dropdown {
        min-width: 120px;
        right: -10px;
    }

    .lang-option {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    /* 헤더 레이아웃 개선 */
    .header {
        padding-top: 80px;
        padding-left: 10px;
        padding-right: 10px;
        text-align: center;
    }

    /* 제목 크기 조정 */
    .title {
        font-size: 1.8rem;
        margin-bottom: 8px;
        line-height: 1.2;
        word-break: keep-all;
        hyphens: auto;
    }

    .subtitle {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    /* 모바일에서 다크모드 컨트롤 버튼 개선 */
    .control-btn {
        background: rgba(255, 255, 255, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .control-btn:hover {
        background: rgba(255, 255, 255, 0.35);
        transform: translateY(-1px);
    }

    /* 모바일에서 언어 드롭다운 개선 */
    .language-dropdown {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        box-shadow: 0 8px 20px var(--shadow);
    }

    /* 컨테이너 패딩 조정 */
    .container {
        padding: 10px;
    }
}

/* 매우 작은 모바일 화면 최적화 */
@media (max-width: 480px) {
    .header {
        padding-top: 90px;
    }

    .title {
        font-size: 1.6rem;
        margin-bottom: 6px;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .header-controls {
        top: 5px;
        right: 5px;
        gap: 3px;
    }

    .control-btn {
        min-width: 36px;
        height: 36px;
        padding: 6px 8px;
        font-size: 0.9rem;
    }

    .language-dropdown {
        min-width: 100px;
        right: -5px;
    }

    .lang-option {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

[data-theme="dark"] .light-icon {
    display: none;
}

[data-theme="dark"] .dark-icon {
    display: inline;
}

.light-icon {
    display: inline;
}

.dark-icon {
    display: none;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: white;
}

[data-theme="dark"] .title {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.screen {
    display: none;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.screen.active {
    display: block;
}


/* 시작 화면 */
.intro-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px var(--shadow);
    animation: fadeInUp 0.6s ease-out;
    width: 100%;
}

.intro-image {
    margin-bottom: 30px;
}

.personality-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto;
    border-radius: 20px;
    position: relative;
    animation: pulse 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    overflow: hidden;
}

.personality-icon::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
}

.hormone-icon {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testosterone {
    position: absolute;
    top: 20%;
    left: 30%;
    width: 25px;
    height: 25px;
    background: linear-gradient(45deg, #4a90e2, #357abd);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

.estrogen {
    position: absolute;
    bottom: 20%;
    right: 30%;
    width: 25px;
    height: 25px;
    background: linear-gradient(45deg, #e91e63, #c2185b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    animation: float 3s ease-in-out infinite reverse;
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.4);
}

.intro-card h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.intro-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* 성별 선택 화면 */
.gender-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: fadeInUp 0.6s ease-out;
    width: 100%;
}

.gender-card h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

.gender-card p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.gender-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.gender-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 30px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-width: 120px;
}

.gender-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.gender-btn.selected {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.gender-icon {
    font-size: 3rem;
}

/* 버튼 스타일 */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* 질문 화면 */
.progress-bar {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    height: 8px;
    margin-bottom: 30px;
    overflow: hidden;
    width: 100%;
}

[data-theme="dark"] .progress-bar {
    background: rgba(255,255,255,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.question-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: fadeInUp 0.6s ease-out;
    width: 100%;
}

.question-card h3 {
    font-size: 1.4rem;
    margin-bottom: 30px;
    color: #333;
    line-height: 1.5;
}

.options {
    display: grid;
    gap: 15px;
}

.option-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: #333;
    min-height: 80px;
    display: flex;
    align-items: center;
    word-wrap: break-word;
    white-space: normal;
}

.option-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateY(-2px);
}

.option-btn.selected {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.question-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* 결과 화면 */
.result-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: fadeInUp 0.6s ease-out;
    width: 100%;
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-header h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.result-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    border-radius: 20px;
    position: relative;
    animation: bounce 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.result-content h3 {
    font-size: 1.3rem;
    margin: 25px 0 15px 0;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.result-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.result-content ul {
    list-style: none;
    padding-left: 0;
}

.result-content li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: #555;
}

.result-content li::before {
    content: '•';
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 호르몬 비율 표시 */
.hormone-ratio {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

.hormone-ratio h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.ratio-bar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.testosterone-bar,
.estrogen-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testosterone-bar span:first-child,
.estrogen-bar span:first-child {
    min-width: 100px;
    font-weight: 500;
    color: #333;
}

.testosterone-bar span:last-child,
.estrogen-bar span:last-child {
    min-width: 50px;
    text-align: right;
    font-weight: bold;
    color: #333;
}

.bar-fill {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-in-out;
    position: relative;
}

.testosterone-bar .fill {
    background: linear-gradient(45deg, #4a90e2, #357abd);
}

.estrogen-bar .fill {
    background: linear-gradient(45deg, #e91e63, #c2185b);
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* 푸터 */
.footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main {
        padding: 10px 0;
    }
    
    .screen {
        max-width: 100%;
    }
    
    .intro-card,
    .question-card,
    .result-card,
    .gender-card {
        padding: 30px 20px;
    }
    
    .progress-bar {
        width: 100%;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .options {
        gap: 12px;
    }
    
    .option-btn {
        min-height: 70px;
        padding: 15px;
        font-size: 0.95rem;
    }
}

/* 테토 에겐 성격 유형 아이콘 색상 */
.icon-tetoman { 
    background: linear-gradient(45deg, #4a90e2, #357abd);
    color: white;
}
.icon-tetonyeo { 
    background: linear-gradient(45deg, #e91e63, #c2185b);
    color: white;
}
.icon-egenman { 
    background: linear-gradient(45deg, #ff9800, #f57c00);
    color: white;
}
.icon-egennyeo { 
    background: linear-gradient(45deg, #9c27b0, #7b1fa2);
    color: white;
}

/* 네비게이션 탭 스타일 */
.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.nav-tab {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    min-width: 100px;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-tab.active {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 탭 콘텐츠 스타일 */
.tab-content {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.tab-content.active {
    display: block;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* 블로그 컨테이너 스타일 */
.blog-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.blog-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.blog-description {
    text-align: center;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* 블로그 그리드 스타일 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.blog-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--shadow);
}

.blog-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
}

.blog-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.blog-link {
    display: inline-block;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.blog-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
}

/* 다크모드 블로그 스타일 */
[data-theme="dark"] .blog-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .blog-card h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .blog-card p {
    color: var(--text-secondary);
}

/* 모바일 반응형 블로그 스타일 */
@media (max-width: 768px) {
    .nav-tabs {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-top: 15px;
        margin-bottom: 20px;
    }

    .nav-tab {
        width: 200px;
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .blog-title {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .blog-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 20px;
    }

    .blog-card {
        padding: 20px;
    }

    .blog-card h3 {
        font-size: 1.3rem;
    }

    .blog-card p {
        font-size: 0.9rem;
    }

    .blog-link {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 5px 0;
    }
    
    .intro-card,
    .question-card,
    .result-card,
    .gender-card {
        padding: 25px 15px;
    }
    
    .nav-tab {
        width: 180px;
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .blog-title {
        font-size: 1.8rem;
    }

    .blog-description {
        font-size: 0.95rem;
    }

    .blog-card {
        padding: 18px;
    }

    .blog-card h3 {
        font-size: 1.2rem;
    }

    .blog-card p {
        font-size: 0.85rem;
    }
    
    .options {
        gap: 10px;
    }
    
    .option-btn {
        min-height: 60px;
        padding: 12px;
        font-size: 0.9rem;
    }
} 