/* 기본 스타일 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 기본 폰트 및 색상 설정 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #4facfe;
    --warning-color: #f093fb;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --background: #ffffff;
    --card-background: #f7fafc;
    --border-color: #e2e8f0;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body, html {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 스타일 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    position: relative;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.logo i {
    font-size: 2rem;
    color: var(--primary-color);
    -webkit-text-fill-color: var(--primary-color);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* 모바일 뷰 토글 버튼 */
.mobile-view-toggle {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--gradient-accent);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-view-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.mobile-view-toggle.active {
    background: var(--gradient-success);
}

.mobile-view-toggle i {
    font-size: 1rem;
}

/* 모바일 뷰 활성화 시 스타일 */
body.mobile-view {
    max-width: 375px;
    margin: 0 auto;
    border-left: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color);
    min-height: 100vh;
    position: relative;
}

body.mobile-view::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: -1;
}

body.mobile-view .header {
    border-radius: 0;
}

body.mobile-view .container {
    max-width: 100%;
    padding: 0 15px;
}

/* 모바일 뷰에서 토글 버튼 위치 조정 */
body.mobile-view .mobile-view-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--gradient-success);
}

/* 모바일 뷰에서 카메라 모달 z-index 조정 */
body.mobile-view .camera-modal {
    z-index: 2000;
}

/* 모바일 뷰에서 로딩 오버레이 z-index 조정 */
body.mobile-view .loading-overlay {
    z-index: 1500;
}

/* 메인 컨텐츠 */
.main-content {
    padding: 3rem 0;
}

/* 업로드 섹션 */
.upload-section {
    margin-bottom: 3rem;
}

.upload-card {
    background: var(--background);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 15px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.upload-area p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.upload-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* 업로드 버튼 그룹 */
.upload-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.camera-btn {
    background: var(--gradient-accent);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.camera-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* 카메라 모달 */
.camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.camera-content {
    background: var(--background);
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--gradient-primary);
    color: white;
}

.camera-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-camera-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-camera-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.camera-body {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

#cameraVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

#cameraCanvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.face-guide {
    text-align: center;
    color: white;
}

.face-outline {
    width: 200px;
    height: 250px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    margin: 0 auto 1rem;
    position: relative;
}

.face-outline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 230px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}

.face-guide p {
    font-size: 1rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.camera-controls {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.capture-btn {
    background: var(--gradient-success);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.capture-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.capture-btn i {
    font-size: 1.5rem;
}

.retake-btn, .use-photo-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.retake-btn:hover, .use-photo-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .container {
        padding: 0;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .upload-card {
        padding: 2rem;
    }
    
    .upload-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .camera-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .camera-body {
        height: 300px;
    }
    
    .face-outline {
        width: 150px;
        height: 200px;
    }
    
    .face-outline::before {
        width: 130px;
        height: 180px;
    }
    
    .camera-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .capture-btn, .retake-btn, .use-photo-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .gender-options {
        flex-direction: row;
        justify-content: center;
    }
    
    .gender-card {
        min-width: initial;
    }
    
    .result-card {
        padding: 2rem 0;
    }
    
    .country-badge h2 {
        font-size: 1.8rem;
    }
    
    .score-number {
        font-size: 4rem;
    }
    
    .country-item {
        padding: 0.8rem 1rem;
    }
    
    .country-info {
        gap: 0.8rem;
    }
    
    .photo-analysis-info {
        padding: 0;
    }
    
    .analysis-item {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .analysis-icon {
        width: 40px;
        height: 40px;
    }
    
    .analysis-icon i {
        font-size: 1.2rem;
    }
    
    .analysis-content h4 {
        font-size: 0.9rem;
    }
    
    .analysis-value {
        font-size: 1rem;
    }
    
    .countries-hint {
        font-size: 0.9rem;
    }
    
    #skinCondition {
        font-size: 0.8rem;
        line-height: 1.3;
        padding: 1rem 1.2rem;
        min-height: 60px;
    }
    
    #geometricAnalysis {
        font-size: 0.9rem;
        line-height: 1.4;
        padding: 1rem 1.5rem;
        min-height: 60px;
    }
    
    .facial-features-title {
        font-size: 1.1rem;
        line-height: 1.3;
        text-align: center;
    }
    
    .logo {
        white-space: normal;
        word-break: break-word;
        text-align: center;
        width: 100%;
        max-width: 95vw;
    }
    
    .upload-area h3 {
        white-space: nowrap;
        font-size: 1.3rem;
    }
    
    .upload-area p {
        white-space: nowrap;
        font-size: 0.9rem;
    }
    
    .gender-selection h3 {
        white-space: nowrap;
        font-size: 1.2rem;
    }
    
    .top-countries h3 {
        white-space: nowrap;
        font-size: 1.5rem;
    }
    
    .reason-section h3 {
        white-space: nowrap;
        font-size: 1.5rem;
    }
    
    .photo-analysis-info h3 {
        white-space: nowrap;
        font-size: 1.5rem;
    }
    
    .analysis-content h4 {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .mobile-view-toggle {
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 1000;
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .mobile-view-toggle span {
        display: none;
    }
    
    .mobile-view-toggle i {
        font-size: 1.2rem;
    }
    
    .header-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .subtitle + #language-selector {
        margin-top: 36px;
        display: flex;
        justify-content: flex-start;
        width: 100%;
        padding-left: 24px;
        box-sizing: border-box;
    }
    #language-selector {
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }
    .language-btn {
        margin: 80px 0 0 90px;
        display: block;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1.5rem 0;
    }
    
    .main-content {
        padding: 2rem 0;
    }
    
    .upload-card {
        padding: 1.5rem;
    }
    
    .result-card {
        padding: 1.5rem 0;
    }
    
    .photo-analysis-info {
        padding: 0;
    }
    
    .photo-analysis-info h3 {
        font-size: 1.3rem;
        margin-bottom: 2rem;
    }
    
    .analysis-grid {
        gap: 0.3rem;
    }
    
    .analysis-item {
        padding: 0 0.5rem;
        width: 100%;
        max-width: 100%;
    }
    
    .analysis-icon {
        margin: 0;
        margin-right: 1rem;
    }
    
    .analysis-icon i {
        font-size: 1.1rem;
    }
    
    .analysis-content h4 {
        margin-bottom: 0.2rem;
    }
    
    .analysis-value {
        font-size: 0.9rem;
    }
    
    .logo {
        font-size: 1.5rem;
        white-space: normal;
        word-break: break-word;
        text-align: center;
        width: 100%;
        max-width: 95vw;
    }
    
    .upload-area h3 {
        font-size: 1.1rem;
        white-space: nowrap;
    }
    
    .upload-area p {
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .gender-selection h3 {
        font-size: 1rem;
        white-space: nowrap;
    }
    
    .top-countries h3 {
        font-size: 1.2rem;
        white-space: nowrap;
    }
    
    .reason-section h3 {
        font-size: 1.2rem;
        white-space: nowrap;
    }
    
    .photo-analysis-info h3 {
        font-size: 1.2rem;
        white-space: nowrap;
    }
    
    .analysis-content h4 {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .country-badge h2 {
        font-size: 1.5rem;
        white-space: nowrap;
    }
    
    .score-number {
        font-size: 3rem;
    }
    
    .congratulation {
        font-size: 1rem;
        white-space: nowrap;
    }
    
    #skinCondition {
        font-size: 0.75rem;
        line-height: 1.2;
        padding: 0.8rem 0.8rem;
        min-height: auto;
        white-space: normal;
        word-break: keep-all;
    }
    
    #geometricAnalysis {
        font-size: 0.85rem;
        line-height: 1.3;
        padding: 0.8rem 1.2rem;
        min-height: auto;
        white-space: normal;
        word-break: keep-all;
    }
    
    .facial-features-title {
        font-size: 1rem;
        line-height: 1.2;
        white-space: normal;
        text-align: center;
    }
}

/* 나라별 얼굴 생김새 설명 */
.facial-features {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.facial-feature-item {
    background: var(--card-background);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.facial-feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.facial-feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.facial-feature-title i {
    font-size: 1rem;
}

.facial-feature-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 미디어 쿼리 추가 */
@media (max-width: 768px) {
    .facial-features {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .facial-feature-item {
        padding: 1.2rem;
    }
}

@media (max-width: 480px) {
    .facial-feature-title {
        font-size: 1rem;
    }
    
    .facial-feature-description {
        font-size: 0.9rem;
    }
}

@media (min-width: 500px) {
    .analysis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 결과 섹션 */
.result-section {
    margin-bottom: 3rem;
}

.result-card {
    background: var(--background);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

/* 최고 점수 국가 */
.top-country {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--gradient-primary);
    border-radius: 15px;
    color: white;
}

.country-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.country-badge img {
    width: 60px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.country-badge h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.score-display {
    margin-bottom: 1rem;
}

.score-number {
    font-size: 6rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.score-label {
    font-size: 1.2rem;
    opacity: 0.9;
}

.congratulation {
    font-size: 1.3rem;
    font-weight: 500;
    opacity: 0.95;
}

/* TOP 10 국가 리스트 */
.top-countries {
    margin-bottom: 3rem;
}

.top-countries h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-countries h3 i {
    color: var(--primary-color);
}

.countries-hint {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    padding: 1rem;
    background: var(--card-background);
    border-radius: 10px;
}

.countries-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.country-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--card-background);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.country-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.country-item.selected {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--primary-color);
}

.country-item.selected .country-name {
    color: var(--primary-color);
    font-weight: 600;
}

.country-item.selected .country-score {
    color: var(--primary-color);
}

.country-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.country-rank {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    min-width: 30px;
}

.country-flag {
    width: 40px;
    height: 30px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.country-name {
    font-weight: 500;
    color: var(--text-primary);
    text-transform: uppercase;
}

.country-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* 매력 점수 이유 설명 */
.reason-section {
    margin-bottom: 3rem;
}

.reason-section h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reason-section h3 i {
    color: var(--primary-color);
}

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

.reason-item {
    background: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.reason-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.reason-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 사진 분석 정보 섹션 */
.photo-analysis-info {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--card-background);
    border-radius: 15px;
}

.photo-analysis-info h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.photo-analysis-info h3 i {
    color: var(--primary-color);
}

.result-card .analysis-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 500px) {
    .result-card .analysis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.analysis-item {
    background: var(--background);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.analysis-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.analysis-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow);
}

.analysis-icon i {
    color: white;
    font-size: 1.5rem;
}

.analysis-content {
    text-align: center;
}

.analysis-content h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.analysis-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: inline-block;
}

/* 나이 특별 스타일 */
#estimatedAge {
    background: rgba(79, 172, 254, 0.1);
    color: var(--success-color);
}

/* 미소 점수 특별 스타일 */
#smileScore {
    background: rgba(240, 147, 251, 0.1);
    color: var(--warning-color);
}

/* 얼굴 품질 특별 스타일 */
#faceQuality {
    background: rgba(79, 172, 254, 0.1);
    color: var(--success-color);
}

/* 매력도 점수 특별 스타일 */
#beautyScore {
    background: rgba(240, 147, 251, 0.1);
    color: var(--warning-color);
}

/* 다시하기 버튼 */
.restart-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.loading-content p {
    color: var(--text-secondary);
}

/* 이미지 미리보기 */
.image-preview {
    margin-bottom: 2rem;
    position: relative;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.change-image-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.change-image-btn:hover {
    background: white;
    transform: scale(1.05);
}

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

.gender-selection h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

.gender-option {
    cursor: pointer;
}

.gender-option input[type="radio"] {
    display: none;
}

.gender-card {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 120px;
}

.gender-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.gender-card span {
    font-weight: 500;
    color: var(--text-primary);
}

.gender-option input[type="radio"]:checked + .gender-card {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.gender-option input[type="radio"]:checked + .gender-card i {
    color: var(--primary-color);
}

/* 분석 버튼 */
.analyze-btn {
    background: var(--gradient-accent);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 300px;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.analyze-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 데스크톱에서만 특정 요소 숨기기 */
@media (min-width: 769px) {
    .mobile-only {
        display: none;
    }
}

/* --- 번역기 이식 스타일 --- */

/* 이식될 컨테이너 위치 설정 */
#translator-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* 구글 번역 드롭다운 기본 스타일 초기화 및 재정의 */
#translator-container .goog-te-gadget-simple {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #ddd !important;
    border-radius: 20px !important;
    padding: 8px 12px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#translator-container .goog-te-menu-value span {
    color: #333 !important;
    font-weight: 500;
}

#translator-container .goog-te-gadget-simple:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

body > .skiptranslate {
    display: none !important;
}

.goog-te-menu-frame {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    border-radius: 8px !important;
}

/* 추가: Google 번역 드롭다운 스타일 */
#google_translate_element {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

body > .skiptranslate {
    display: none !important;
}

.goog-te-gadget-simple {
    background-color: #fff !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 4px !important;
    padding: 5px 8px !important;
}

/* 언어 선택 버튼 스타일 */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-btn {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.language-btn:hover {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.language-btn i {
    font-size: 16px;
}

/* Google 번역 드롭다운 메뉴 스타일 */
.goog-te-menu-frame {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    border-radius: 8px !important;
    border: none !important;
}

/* 언어 선택 모달 스타일 */
.language-modal {
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.language-modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 25px 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 400px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.25);
    animation: slideIn 0.3s ease-out;
}

.language-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.language-modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 500;
    color: #333;
}

.close-language-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.close-language-modal:hover,
.close-language-modal:focus {
    color: #000;
    text-decoration: none;
}

.language-modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.language-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.language-list li a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #555;
    font-size: 1.1rem;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}

.language-list li a:hover {
    background-color: #f0f2f5;
    color: #000;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#topCountryName {
    text-transform: uppercase;
} 