@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
}

.lang-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
}

.lang-btn {
    padding: 8px 16px;
    font-size: 0.85em;
    font-weight: 600;
    border: 2px solid #F9D142;
    border-radius: 20px;
    background: transparent;
    color: #F9D142;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(249, 209, 66, 0.2);
}

.lang-btn.active {
    background: #F9D142;
    color: #1a1a2e;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.95) 0%, rgba(26, 26, 46, 0) 100%);
    padding: 15px 30px;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.5em;
    font-weight: 700;
    color: #F9D142;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #F9D142;
}

main {
    padding-top: 100px;
    padding-bottom: 50px;
}

.test-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.test-section h1 {
    font-size: 2.2em;
    color: #F9D142;
    margin-bottom: 15px;
}

.test-desc {
    color: #999;
    margin-bottom: 40px;
    font-size: 1.05em;
}

.upload-area {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
}

.upload-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
}

.upload-btn, .camera-btn {
    padding: 15px 30px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn {
    background: #F9D142;
    color: #1a1a2e;
}

.camera-btn {
    background: transparent;
    border: 2px solid #F9D142;
    color: #F9D142;
}

.upload-btn:hover, .camera-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(249, 209, 66, 0.3);
}

.image-upload-wrap {
    border: 3px dashed rgba(249, 209, 66, 0.3);
    border-radius: 15px;
    padding: 50px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.image-upload-wrap:hover {
    border-color: #F9D142;
    background: rgba(249, 209, 66, 0.05);
}

.drag-text h3 {
    color: #F9D142;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.drag-text p {
    color: #888;
    font-size: 0.9em;
}

.privacy-notice {
    margin-top: 15px;
    color: #667eea !important;
    font-size: 0.85em !important;
}

.file-upload-content {
    text-align: center;
}

.file-upload-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.image-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.start-btn, .remove-btn {
    padding: 15px 35px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.remove-btn {
    background: transparent;
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
}

.start-btn:hover, .remove-btn:hover {
    transform: translateY(-3px);
}

#face-error-message {
    background: #ff4444;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.tips-section {
    max-width: 600px;
    margin: 50px auto 0;
    padding: 0 20px;
}

.tips-section h2 {
    font-size: 1.4em;
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.tips-list {
    list-style: none;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 25px 30px;
}

.tips-list li {
    padding: 12px 0;
    color: #999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 25px;
    position: relative;
}

.tips-list li:last-child {
    border-bottom: none;
}

.tips-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #F9D142;
}

.error-message {
    color: #F9D142;
    font-size: 1.1em;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 20px;
}

footer {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 0.9em;
}

footer a {
    color: #888;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-content {
    text-align: center;
    padding: 20px;
}

.loading-title {
    font-size: 1.4em;
    margin-bottom: 30px;
    color: #F9D142;
}

.progress-container {
    width: 280px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto 15px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #F9D142, #ffeb3b);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 2em;
    font-weight: bold;
    color: #F9D142;
}

.result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(135deg, #292826 0%, #3a3836 100%);
    border-radius: 25px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    animation: modalPop 0.4s ease-out;
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-title {
    font-size: 1.2em;
    color: #aaa;
    margin-bottom: 15px;
}

.modal-result {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 15px;
}

.modal-result.spring { background: linear-gradient(135deg, #FCEDDA 0%, #ffe4c4 100%); color: #EE4E34; }
.modal-result.summer { background: linear-gradient(135deg, #8AAAE5 0%, #6b94d9 100%); color: white; }
.modal-result.autumn { background: linear-gradient(135deg, #101820 0%, #1a2636 100%); color: #F2AA4C; }
.modal-result.winter { background: linear-gradient(135deg, #00203F 0%, #003366 100%); color: #ADEFD1; }

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 15px 30px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.primary {
    background: linear-gradient(135deg, #F9D142 0%, #e6c030 100%);
    color: #292826;
}

.modal-btn.secondary {
    background: transparent;
    border: 2px solid #F9D142;
    color: #F9D142;
}

.modal-btn:hover {
    transform: translateY(-3px);
}

@media (max-width: 600px) {
    .test-section h1 { font-size: 1.8em; }
    .upload-buttons { flex-direction: column; }
    .upload-btn, .camera-btn { width: 100%; }
    .image-actions { flex-direction: column; }
    .start-btn, .remove-btn { width: 100%; }
    .modal-content { padding: 25px 20px; }
    .modal-result { font-size: 1.5em; }
    .modal-btn { width: 100%; }
    
    .lang-switch {
        top: auto;
        bottom: 20px;
    }
}