/* Agency Type Test - 16personalities inspired styles */

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Header */
.header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #5a4a8a;
    text-decoration: none;
}

.logo-dots {
    display: inline-flex;
    gap: 3px;
    margin-right: 10px;
}

.logo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.logo-dot:nth-child(1) { background: #4298b4; }
.logo-dot:nth-child(2) { background: #4ecdc4; }
.logo-dot:nth-child(3) { background: #88c542; }
.logo-dot:nth-child(4) { background: #f5a623; }

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

.nav-links a {
    text-decoration: none;
    color: #666;
    font-size: 14px;
}

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

.lang-switch {
    display: flex;
    gap: 10px;
}

.lang-switch a {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.lang-switch a.active {
    background: #5a4a8a;
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 60px 20px;
}

.hero h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero .subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
}

/* Steps Section */
.steps {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.step {
    background: white;
    border-radius: 12px;
    padding: 30px 25px;
    flex: 1;
    max-width: 280px;
    text-align: center;
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.step-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    object-position: center top;
    margin: 0 auto 20px;
    border-radius: 12px;
}

.step-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}

.step:nth-child(1) .step-badge {
    background: #e8f5e9;
    color: #2e7d32;
}

.step:nth-child(2) .step-badge {
    background: #fff3e0;
    color: #ef6c00;
}

.step:nth-child(3) .step-badge {
    background: #f3e5f5;
    color: #7b1fa2;
}

.step h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.step p {
    font-size: 14px;
    color: #666;
}

/* Progress Bar */
.progress-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}

.progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #88c542);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.part-indicator {
    text-align: center;
    margin-top: 5px;
    font-size: 13px;
    color: #5a4a8a;
    font-weight: 500;
}

/* Question Section */
.question-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.question-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: none;
}

.question-card.active {
    display: block;
}

.question-number {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

.question-text {
    font-size: 22px;
    font-weight: 500;
    color: #333;
    margin-bottom: 40px;
    line-height: 1.5;
}

/* Answer Scale */
.answer-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.scale-label {
    font-size: 14px;
    font-weight: 500;
    width: 80px;
}

.scale-label.agree {
    color: #4ecdc4;
    text-align: left;
}

.scale-label.disagree {
    color: #9c7bb8;
    text-align: right;
}

.scale-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex: 1;
    padding: 0 20px;
}

.scale-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.scale-option:hover {
    transform: scale(1.1);
}

.scale-option:nth-child(1),
.scale-option:nth-child(2),
.scale-option:nth-child(3) {
    border-color: #4ecdc4;
}

.scale-option:nth-child(4) {
    border-color: #ccc;
    width: 35px;
    height: 35px;
}

.scale-option:nth-child(5),
.scale-option:nth-child(6),
.scale-option:nth-child(7) {
    border-color: #9c7bb8;
}

.scale-option:nth-child(1) { width: 60px; height: 60px; }
.scale-option:nth-child(2) { width: 50px; height: 50px; }
.scale-option:nth-child(3) { width: 40px; height: 40px; }
.scale-option:nth-child(5) { width: 40px; height: 40px; }
.scale-option:nth-child(6) { width: 50px; height: 50px; }
.scale-option:nth-child(7) { width: 60px; height: 60px; }

.scale-option.selected {
    background: currentColor;
}

.scale-option:nth-child(1).selected,
.scale-option:nth-child(2).selected,
.scale-option:nth-child(3).selected {
    background: #4ecdc4;
    border-color: #4ecdc4;
}

.scale-option:nth-child(4).selected {
    background: #ccc;
    border-color: #ccc;
}

.scale-option:nth-child(5).selected,
.scale-option:nth-child(6).selected,
.scale-option:nth-child(7).selected {
    background: #9c7bb8;
    border-color: #9c7bb8;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.nav-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn.prev {
    background: #f0f0f0;
    color: #666;
}

.nav-btn.prev:hover {
    background: #e0e0e0;
}

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

.nav-btn.next:hover,
.nav-btn.submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Result Page Styles */
.result-hero {
    padding: 60px 20px;
    color: white;
}

.result-hero.sleepwalker { background: linear-gradient(135deg, #636e72 0%, #2d3436 100%); }
.result-hero.dreamer { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.result-hero.grinder { background: linear-gradient(135deg, #f5af19 0%, #f12711 100%); }
.result-hero.creator { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }

.result-hero-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.result-text {
    flex: 1;
    text-align: left;
}

.archetype-label {
    font-size: 14px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.result-type-name {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
}

.result-type-subtitle {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.result-type-desc {
    font-size: 16px;
    opacity: 0.85;
    line-height: 1.6;
}

.result-image {
    flex-shrink: 0;
}

.result-image img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* Metaphor Quote */
.metaphor-quote {
    font-size: 18px;
    font-style: italic;
    color: #555;
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    border-left: none;
}

/* Result Content */
.result-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.result-section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.result-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    border-left: 4px solid #5a4a8a;
    padding-left: 15px;
}

.result-section p {
    font-size: 16px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
}

.result-section blockquote {
    background: #f8f9fa;
    border-left: 4px solid #5a4a8a;
    padding: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
}

/* Score Chart */
.score-chart {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 30px 0;
}

.score-item {
    width: 100%;
}

.score-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.score-bar {
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.score-fill.vision { background: linear-gradient(90deg, #667eea, #764ba2); }
.score-fill.execution { background: linear-gradient(90deg, #11998e, #38ef7d); }
.score-fill.mapping { background: linear-gradient(90deg, #667eea, #764ba2); }
.score-fill.making { background: linear-gradient(90deg, #11998e, #38ef7d); }
.score-fill.meshing { background: linear-gradient(90deg, #f5af19, #f12711); }

.score-desc {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

/* Prescription List */
.prescription-list {
    list-style: none;
}

.prescription-list li {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

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

.prescription-number {
    width: 30px;
    height: 30px;
    background: #5a4a8a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
}

.action-btn {
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.action-btn.secondary {
    background: white;
    color: #5a4a8a;
    border: 2px solid #5a4a8a;
}

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

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 14px;
}

.footer a {
    color: #5a4a8a;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 28px;
    }

    .question-text {
        font-size: 18px;
    }

    .scale-options {
        gap: 8px;
    }

    .scale-option {
        width: 35px !important;
        height: 35px !important;
    }

    .scale-option:nth-child(1) { width: 45px !important; height: 45px !important; }
    .scale-option:nth-child(7) { width: 45px !important; height: 45px !important; }

    .score-chart {
        flex-direction: column;
    }

    .nav-links {
        display: none;
    }

    .result-hero-content {
        flex-direction: column;
        text-align: center;
    }

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

    .result-image img {
        width: 200px;
        height: 200px;
    }

    .result-type-name {
        font-size: 32px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }
}

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

.question-card.active {
    animation: fadeIn 0.3s ease;
}

/* Loading Spinner */
.loading {
    display: none;
    text-align: center;
    padding: 60px;
}

.loading.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #5a4a8a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* ============================================
   Share Modal & Card Styles
   ============================================ */

/* Modal Overlay */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.share-modal-overlay.active {
    display: flex;
}

/* Modal Content */
.share-modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 420px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.share-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.share-modal-close:hover {
    color: #333;
}

/* Share Card Container */
.share-card-container {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

/* Share Card */
.share-card {
    width: 320px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.share-card-header {
    padding: 15px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.share-card-header.sleepwalker {
    background: linear-gradient(135deg, #607D8B 0%, #455A64 100%);
}

.share-card-header.dreamer {
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
}

.share-card-header.grinder {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
}

.share-card-header.creator {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
}

.share-card-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.share-card-image-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
}

.share-card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share-card-body {
    padding: 20px;
    text-align: center;
}

.share-card-archetype {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.share-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.share-card-subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

/* Traits Section */
.share-card-traits {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.share-card-trait {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    text-align: left;
}

.share-card-trait.strength {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.share-card-trait.weakness {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

.trait-icon {
    font-size: 18px;
}

.trait-content {
    display: flex;
    flex-direction: column;
}

.trait-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trait-value {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

/* Mini Score Bars */
.share-card-scores {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.mini-score {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-score-label {
    font-size: 11px;
    color: #888;
    width: 35px;
    text-align: right;
}

.mini-score-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.mini-score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.mini-score-fill.mapping {
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.mini-score-fill.making {
    background: linear-gradient(90deg, #11998e, #38ef7d);
}

.mini-score-fill.meshing {
    background: linear-gradient(90deg, #f5af19, #f12711);
}

.share-card-footer {
    font-size: 11px;
    color: #aaa;
    margin-top: 10px;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 12px;
}

.share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.share-btn.download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.share-btn.copy {
    background: #f0f0f0;
    color: #333;
}

.share-btn.copy:hover {
    background: #e0e0e0;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
}

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

/* Mobile Responsive for Share Modal */
@media (max-width: 480px) {
    .share-modal-content {
        padding: 20px;
        margin: 10px;
    }

    .share-card {
        width: 280px;
    }

    .share-card-image-wrapper {
        height: 150px;
    }

    .share-card-title {
        font-size: 20px;
    }

    .share-buttons {
        flex-direction: column;
    }
}
