/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #333;
    transition: all 0.3s ease;
}

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

/* Language and Theme Controls */
.language-selector {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
}

.lang-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    color: #495057;
    min-width: 35px;
}

.lang-btn:hover {
    border-color: #6c757d;
    background: #ffffff;
    transform: translateY(-1px);
}

.lang-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}



/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 0 40px;
}

.header h1 {
    font-size: 3rem;
    color: #2c3e50;
    margin-bottom: 10px;
    animation: fadeInUp 0.8s ease;
}

.header p {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* Intro Section */
.intro-section {
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.intro-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    max-width: 600px;
}

.intro-icon {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 20px;
}

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

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

.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #007bff;
    font-weight: 500;
}

.feature-item i {
    font-size: 1.2rem;
}

/* Start Section */
.start-section {
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.name-input-group {
    margin-bottom: 30px;
}

.name-input-group label {
    display: block;
    color: #495057;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.name-input-group input {
    width: 100%;
    max-width: 300px;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    background: #ffffff;
    transition: all 0.3s ease;
}

.name-input-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.start-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.start-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}



/* Test Page Styles */
.test-container {
    padding: 0;
    background: none;
}

.test-header {
    background: #ffffff;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e9ecef;
}

.test-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.nav-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #007bff;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(0, 123, 255, 0.1);
    transform: scale(1.1);
}

.test-info span {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

/* Progress Bar */
.progress-container {
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #007bff;
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: #007bff;
}

/* Question Section */
.question-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.question-container {
    width: 100%;
    max-width: 600px;
    position: relative;
    height: 400px;
}

.question-card {
    position: absolute;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.5s ease;
}

.question-card.active {
    opacity: 1;
    transform: translateX(0);
}

.question-card.exit {
    opacity: 0;
    transform: translateX(-100px);
}

.question-number {
    font-size: 1rem;
    color: #007bff;
    font-weight: 600;
    margin-bottom: 10px;
}

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

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-btn {
    background: #ffffff;
    border: 2px solid #e9ecef;
    padding: 18px 25px;
    border-radius: 8px;
    font-size: 1.1rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.answer-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.answer-btn:active {
    transform: translateY(0);
}

/* Result Page Styles */
.result-container {
    padding: 20px;
}

.result-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}

.result-section {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.result-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    text-align: center;
    max-width: 600px;
    width: 100%;
    animation: fadeInUp 0.8s ease;
}

.result-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 700;
}

.result-description {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.result-score {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.score-item {
    text-align: center;
}

.score-value {
    font-size: 2rem;
    font-weight: bold;
    color: #007bff;
}

.score-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* Action Section */
.action-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.share-section {
    text-align: center;
}

.share-section h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

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

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.share-btn:hover {
    background: #f8f9fa;
    border-color: #6c757d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.share-btn span {
    font-size: 0.9rem;
    font-weight: 500;
}

.share-btn.kakao {
    color: #ffcd00;
}

.share-btn.line {
    color: #00c300;
}

.share-btn.whatsapp {
    color: #25d366;
}

.share-btn.wechat {
    color: #1aad19;
}

.share-btn.copy {
    color: #007bff;
}

.restart-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.restart-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}





/* Loading Overlay */
.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: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

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

.loading-spinner {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #007bff;
}

.loading-content p {
    font-size: 1.2rem;
}

/* Modal */
.modal-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: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.modal-body p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 25px;
}

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

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .language-selector,
    .theme-toggle {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        margin-bottom: 20px;
    }

    .main-content {
        padding: 40px 0 20px;
    }

    .header h1 {
        font-size: 2.2rem;
    }

    .intro-card {
        padding: 30px 20px;
    }

    .features {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }



    .question-card {
        padding: 30px 20px;
    }

    .question-text {
        font-size: 1.2rem;
    }

    .share-buttons {
        gap: 10px;
    }

    .share-btn {
        min-width: 70px;
        padding: 12px;
    }

    .result-score {
        gap: 20px;
    }


}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .header p {
        font-size: 1rem;
    }

    .intro-card {
        padding: 25px 15px;
    }

    .intro-card h2 {
        font-size: 1.5rem;
    }

    .question-card {
        padding: 25px 15px;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .answer-btn {
        padding: 15px 20px;
        font-size: 1rem;
    }

    .result-card {
        padding: 30px 20px;
    }

    .result-title {
        font-size: 2rem;
    }

    .share-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .share-btn {
        min-width: auto;
        padding: 10px;
    }

    .share-btn span {
        font-size: 0.8rem;
    }
}
