/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    /* Premium background: Soft off-white with subtle warmth */
    background-color: #fdfbf7;
    background-image: radial-gradient(#e0c3fc 1px, transparent 1px), radial-gradient(#e0c3fc 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Page transitions */
.page {
    display: none;
    width: 100%;
    animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.page.active {
    display: block;
}

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

/* Card styles */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
    padding: 50px;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    /* Premium Gradient: Rose Gold to Deep Purple */
    background: linear-gradient(90deg, #d4af37, #b76e79, #667eea);
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    color: #1a1a2e;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.header h2 {
    color: #b76e79; /* Rose Goldish */
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    margin-bottom: 40px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #b76e79);
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Question styles */
.question-header {
    text-align: center;
    margin-bottom: 40px;
}

.question-header h2 {
    color: #1a1a2e;
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.question-header p {
    color: #888;
    font-size: 1rem;
    font-weight: 500;
}

.question-content h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 35px;
    text-align: center;
    line-height: 1.6;
    font-weight: 600;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 16px 36px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(26, 26, 46, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(26, 26, 46, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #555;
}

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

.btn-option {
    background: white;
    color: #2c3e50;
    border: 2px solid #f0f0f0;
    width: 100%;
    margin-bottom: 16px;
    text-align: left;
    padding: 22px 30px;
    border-radius: 16px;
    font-size: 1.05rem;
    transition: all 0.2s ease;
}

.btn-option:hover {
    border-color: #b76e79;
    background: #fffafa;
    color: #b76e79;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(183, 110, 121, 0.1);
}

.btn-option.selected {
    background: #b76e79;
    color: white;
    border-color: #b76e79;
    box-shadow: 0 8px 20px rgba(183, 110, 121, 0.3);
}

/* Options container */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Content styles */
.content {
    text-align: center;
}

.intro {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 40px;
    line-height: 1.8;
}

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    background: #fdfbf7;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature .icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.feature span:last-child {
    font-weight: 600;
    color: #1a1a2e;
}

/* Search form styles */
.search-form {
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 18px;
    border: 2px solid #f0f0f0;
    border-radius: 14px;
    font-size: 1.05rem;
    font-family: 'Noto Sans KR', sans-serif;
    transition: all 0.3s ease;
    background: #fdfbf7;
}

.input-group input:focus {
    outline: none;
    border-color: #b76e79;
    background: white;
    box-shadow: 0 5px 15px rgba(183, 110, 121, 0.1);
}

#search-btn {
    width: 100%;
    margin-top: 15px;
}

/* Search results */
.search-results {
    margin-top: 35px;
    padding: 25px;
    background: #fdfbf7;
    border-radius: 20px;
    animation: slideInUp 0.4s ease-out;
}

.search-results h4 {
    margin-bottom: 18px;
    color: #1a1a2e;
    font-weight: 700;
}

.result-item {
    padding: 20px;
    border: 1px solid #eee;
    background: white;
    border-radius: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    animation: slideInUp 0.3s ease-out;
}

.result-item:hover {
    border-color: #b76e79;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.result-item.selected {
    background: #1a1a2e;
    color: white;
    border-color: #1a1a2e;
}

.result-item.selected .qualification-preview {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Result page styles */
.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-icon {
    font-size: 4.5rem;
    margin-bottom: 25px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.result-title {
    color: #1a1a2e;
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.result-message {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 35px;
    font-size: 1.15rem;
    line-height: 1.7;
    color: #2c3e50;
    border-left: 5px solid #ccc;
}

.result-message.success {
    background: #f0f9f4;
    border-left-color: #2ecc71;
    color: #155724;
}

.result-message.error {
    background: #fef2f2;
    border-left-color: #e74c3c;
    color: #721c24;
}

.required-documents {
    margin-bottom: 40px;
}

.required-documents h3 {
    color: #1a1a2e;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 700;
}

.required-documents ul {
    list-style: none;
    padding: 0;
}

.required-documents li {
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    color: #555;
    display: flex;
    align-items: center;
}

.required-documents li:before {
    content: "📄";
    margin-right: 12px;
    font-size: 1.2rem;
}

.cta-section {
    background: linear-gradient(135deg, #b76e79, #9b59b6);
    color: white;
    padding: 35px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 35px;
    box-shadow: 0 10px 30px rgba(183, 110, 121, 0.3);
}

.cta-section h3 {
    margin-bottom: 12px;
    font-size: 1.4rem;
    font-weight: 700;
}

.cta-section p {
    margin-bottom: 24px;
    opacity: 0.95;
    font-size: 1.05rem;
}

.cta-section .btn {
    background: white;
    color: #b76e79;
}

.cta-section .btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.result-actions {
    text-align: center;
}

/* Qualification preview in search results */
.qualification-preview {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

.qualification-preview.qualified {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.qualification-preview.not-qualified {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Additional search results */
.additional-results {
    margin-top: 25px;
    padding: 20px;
    background: #f1f3f5;
    border-radius: 14px;
    border-left: 4px solid #adb5bd;
}

.additional-results h4 {
    color: #495057;
    font-size: 1.05rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.additional-item {
    padding: 10px 14px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #495057;
    border: 1px solid #e9ecef;
}

/* API notice */
.api-notice {
    margin-top: 25px;
    padding: 18px;
    background: #fff9db;
    color: #856404;
    border: 1px solid #ffe066;
    border-radius: 14px;
    font-size: 0.95rem;
    text-align: center;
    position: relative;
    font-weight: 500;
}

.api-notice:before {
    content: "ℹ️";
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 15px;
        background-size: 20px 20px;
    }
    
    .card {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header h2 {
        font-size: 1rem;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .btn-option {
        padding: 18px 20px;
        font-size: 1rem;
    }
    
    .result-icon {
        font-size: 3.5rem;
    }
    
    .result-title {
        font-size: 1.8rem;
    }
}

/* Animation improvements */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}