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

body {
    font-family: 'Apple SD Gothic Neo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100dvh;
    /* overflow-x: hidden; ← 이 줄을 주석처리 또는 삭제 */
}

.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: transparent;
    box-shadow: none;
    padding: 0;
}
.language-icon-btn {
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    font-size: 22px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.language-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    background: #3b338a; /* 진한 보라색 */
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(60, 40, 120, 0.25), 0 2px 8px rgba(0,0,0,0.10);
    border: 2px solid #667eea;
    padding: 8px 0;
    z-index: 1001;
}
.language-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 12px 28px;
    text-align: left;
    font-size: 16px;
    color: #fff; /* 흰색 글씨 */
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.language-btn:hover,
.language-btn.active {
    background: #ffb300; /* 노란색 hover (보라와 대비) */
    color: #3b338a;      /* 진한 보라 글씨 */
}

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

.header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 50px;
}

.header h1 {
    color: white;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: bounce 2s ease-in-out infinite;
}

.header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    color: white;
    font-size: 12px;
    font-weight: 600;
    animation: fadeInUp 1s ease-out;
}

.trending-badge {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin: 10px auto;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

.upload-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.upload-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

.upload-tips {
    background: linear-gradient(45deg, #f8f9ff, #fff);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.tips-title {
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tips-list {
    font-size: 12px;
    color: #666;
    text-align: left;
    line-height: 1.4;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 20px;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #f8f9ff, #fff);
    position: relative;
    z-index: 1;
}

.upload-area:hover {
    border-color: #764ba2;
    background: linear-gradient(45deg, #f0f2ff, #f8f9ff);
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 50px;
    margin-bottom: 15px;
    color: #667eea;
}

.upload-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.upload-subtext {
    font-size: 14px;
    color: #666;
}

#fileInput {
    display: none;
}

.preview-container {
    margin: 20px 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preview-image {
    width: 200px;
    height: 200px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    display: block;
}

.analyze-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    margin: 20px auto 0 auto;
    display: none;
}

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

.error-message {
    background: #ff4757;
    color: white;
    padding: 15px;
    border-radius: 15px;
    margin: 15px 0;
    font-size: 14px;
    display: none;
}

.loading-section {
    display: none;
    position: static;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    min-height: 200px;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(102, 126, 234, 0.3);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

.loading-text {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.loading-progress {
    width: 100%;
    height: 8px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
}

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

.result-section {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.result-title {
    font-size: 24px;
    font-weight: 800;
    color: #333;
    margin-bottom: 20px;
}

.result-position {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 20px;
    margin: 20px 0;
    font-size: 22px;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.result-description {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 15px;
}

.confidence-score {
    background: #2ed573;
    color: white;
    padding: 10px 20px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    margin: 15px 0;
    display: inline-block;
}

.analysis-details {
    background: #f1f2f6;
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    text-align: left;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 14px;
}

.detail-label {
    font-weight: 600;
    color: #333;
}

.detail-value {
    color: #667eea;
    font-weight: 700;
}

.share-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.share-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.share-kakao {
    background: #FEE500;
    color: #3C1E1E;
}

.share-instagram {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    color: white;
}

.share-twitter {
    background: #1DA1F2;
    color: white;
}

.share-copy {
    background: #6c757d;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.restart-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.popular-positions {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(45deg, #f0f2ff, #f8f9ff);
    border-radius: 15px;
}

.popular-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.position-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.position-tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.position-tag:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.heart {
    position: absolute;
    color: rgba(255, 255, 255, 0.3);
    font-size: 20px;
    animation: float 6s ease-in-out infinite;
}

.sparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.sparkle {
    position: absolute;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    animation: sparkle 3s ease-in-out infinite;
}

.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

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

    100% {
        transform: rotate(360deg);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 4px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .upload-section,
    .result-section,
    .loading-section {
        padding: 10px;
        border-radius: 10px;
        margin: 10px 0;
        background: rgba(255,255,255,0.75);
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
        backdrop-filter: blur(4px);
    }

    .header h1 {
        font-size: 24px;
    }

    .upload-section,
    .loading-section,
    .result-section {
        padding: 20px;
    }

    .header {
        padding-top: 70px;
    }
}

/* PC에서만 중앙 400px만 보이고 양옆이 잘리게 */
@media (min-width: 480px) {
    body {
        overflow-x: auto;
    }
    .container {
        width: 100%;
        max-width: 700px;
        min-width: 400px;
        margin: 0 auto;
        overflow: visible;
        padding: 0 24px;
    }
}

.uploading-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.uploading-spinner {
    border: 6px solid #eee;
    border-top: 6px solid #667eea;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.uploading-text {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    background: white;
    padding: 16px 32px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.upload-section, .result-section, .loading-section {
    background: rgba(255,255,255,0.85);
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.10);
    margin: 24px 0;
    backdrop-filter: blur(8px);
}

.site-footer {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 32px 0 16px 0;
    text-align: center;
    font-size: 14px;
    margin-top: 40px;
    border-top: 2px solid #eee;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 24px;
    flex-wrap: wrap;
}
.footer-left {
    text-align: left;
    line-height: 1.6;
}
.footer-powered {
    font-size: 12px;
    color: #ffe082;
}
.footer-author {
    font-size: 12px;
    color: #fff;
}
.footer-right a {
    color: #fff;
    margin-left: 16px;
    font-size: 20px;
    transition: color 0.2s;
}
.footer-right a:hover {
    color: #ffb300;
}
@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .footer-left, .footer-right {
        text-align: center;
    }
}

.main-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    z-index: 2000;
    box-shadow: 0 2px 12px rgba(60,40,120,0.08);
}
.header-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    padding: 0 24px;
    height: 60px;
}
.main-header .site-logo {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    text-align: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    white-space: nowrap;
}
.header-nav {
    position: absolute;
    right: 24px;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0;
}
.main-header .language-icon-btn {
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    font-size: 22px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.main-header .language-dropdown {
    position: absolute;
    top: 55px;
    right: 0;
    background: #3b338a;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(60, 40, 120, 0.25), 0 2px 8px rgba(0,0,0,0.10);
    border: 2px solid #667eea;
    padding: 8px 0;
    z-index: 1001;
}
.main-header .language-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 12px 28px;
    text-align: left;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.main-header .language-btn:hover,
.main-header .language-btn.active {
    background: #ffb300;
    color: #3b338a;
}
@media (max-width: 480px) {
    .main-header .header-content {
        padding: 0 8px;
        height: 48px;
    }
    .main-header .site-logo {
        font-size: 16px;
    }
    .header-nav {
        right: 8px;
    }
    .main-header .header-content::after {
        width: 32px;
        height: 32px;
    }
}
body {
    padding-top: 60px;
}
@media (max-width: 600px) {
    body {
        padding-top: 48px;
    }
}
.subtitle-bounce {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
    animation: bounce 2s ease-in-out infinite;
    font-weight: 700;
}

.hamburger-btn {
    background: transparent;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hamburger-icon {
    font-size: 28px;
    color: #3b338a;
}
.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100dvh;
    background: rgba(0,0,0,0.25);
    z-index: 4000;
    display: none;
}
.sidebar-overlay.open {
    display: block;
}
.sidebar-language {
    position: fixed;
    top: 0; right: -260px;
    width: 260px;
    height: 100dvh;
    background: #fff;
    box-shadow: -2px 0 16px rgba(60,40,120,0.10);
    z-index: 5000;
    transition: right 0.3s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    padding: 32px 20px 20px 20px;
}
.sidebar-language.open {
    right: 0;
}
.sidebar-close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #764ba2;
    position: absolute;
    top: 18px; right: 18px;
    cursor: pointer;
}
.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: #3b338a;
    margin-bottom: 28px;
    margin-top: 10px;
}
.sidebar-language .language-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 14px 0;
    text-align: left;
    font-size: 16px;
    color: #3b338a;
    cursor: pointer;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background 0.2s, color 0.2s;
}
.sidebar-language .language-btn.active,
.sidebar-language .language-btn:hover {
    background: #ffb300;
    color: #3b338a;
}
@media (max-width: 480px) {
    .sidebar-language {
        width: 80vw;
        min-width: 180px;
        max-width: 320px;
        right: -80vw;
    }
    .main-header .header-content {
        padding: 0 8px;
        height: 48px;
    }
    .main-header .site-logo {
        font-size: 16px;
    }
    .header-nav {
        right: 8px;
    }
    .main-header .header-content::after {
        width: 32px;
        height: 32px;
    }
} 