/* SBTI Test Styles */
:root {
    --mbti-blue: #3F51B5;
    --sbti-orange: #FF5722;
    --sbti-yellow: #FFEB3B;
    --dark-bg: #121212;
    --card-bg: #1E1E1E;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
}

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: 60px;
    padding-bottom: 40px;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    text-align: center;
}

/* Lang Switcher */
.lang-switcher {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
}

.lang-btn {
    width: auto !important;
    padding: 6px 16px !important;
    background: rgba(255,255,255,0.1) !important;
    font-size: 0.8rem !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    color: white !important;
    border-radius: 8px !important;
    cursor: pointer;
    margin-bottom: 0 !important;
}

/* Screens */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.screen.active {
    display: block;
}

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

/* Hero / Welcome */
.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-top: 1rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -2px;
}

.hero-subtitle-top {
    color: var(--text-secondary);
    font-size: 1.4rem;
    display: block;
    margin-bottom: 8px;
    letter-spacing: 0;
}

.hero-cta-text {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--sbti-yellow);
    margin-bottom: 1rem;
}

.hero-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.title-sbti { color: var(--sbti-orange); }
.title-vs { font-size: 1.5rem; color: var(--text-secondary); vertical-align: middle; }
.title-mbti { color: var(--mbti-blue); }

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-tag {
    display: inline-block;
    background-color: var(--sbti-orange);
    color: white;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 18px;
    margin-bottom: 12px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-primary {
    background-color: var(--sbti-orange);
    color: white;
    margin-top: 2rem;
}

.btn-primary:hover, .btn-primary:active {
    background-color: #f44336;
    transform: scale(1.02);
}

.btn-cta {
    font-size: 1.4rem;
    padding: 22px;
}

.btn-option {
    background-color: var(--card-bg);
    color: var(--text-primary);
    text-align: left;
    border: 2px solid transparent;
    min-height: 56px;
}

.btn-option:hover, .btn-option:active {
    border-color: var(--sbti-orange);
    background-color: #2c2c2c;
}

/* Share Button */
.btn-share {
    background: linear-gradient(135deg, #FF5722, #FF8C00);
    color: white;
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.btn-share:hover, .btn-share:active {
    background: linear-gradient(135deg, #F44336, #FF6D00);
    transform: scale(1.02);
}

/* Restart Button */
.btn-restart {
    background-color: transparent;
    border: 2px solid var(--sbti-orange);
    color: var(--sbti-orange);
    margin-top: 0;
}

.btn-restart:hover, .btn-restart:active {
    background-color: rgba(255, 87, 34, 0.1);
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 6px;
    background-color: #333;
    border-radius: 3px;
    margin-bottom: 2rem;
}

.progress-bar {
    height: 100%;
    background-color: var(--sbti-orange);
    width: 0%;
    transition: width 0.3s ease-out;
    border-radius: 3px;
}

/* Question */
.question-text {
    margin-bottom: 2rem;
    font-size: 1.3rem;
    line-height: 1.5;
}

/* Result */
.result-heading {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.result-card {
    background-color: var(--card-bg);
    border-radius: 24px;
    padding: 40px 20px;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 4px solid var(--sbti-orange);
}

.result-id {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.result-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

.result-name {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--sbti-orange);
}

.result-mbti {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--mbti-blue);
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.result-desc {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    padding: 0 10px;
}

.result-persona {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border-radius: 12px;
    text-align: left;
    border-left: 4px solid var(--sbti-orange);
}

.traits-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.trait-tag {
    background-color: #333;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
}

/* Types Page Grid */
.types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 2rem;
}

.type-item {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
}

.type-item h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.type-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Links */
.footer-links {
    margin-top: 3rem;
}

.link {
    color: var(--text-secondary);
    text-decoration: underline;
    font-size: 0.9rem;
    cursor: pointer;
}

.site-footer {
    width: 100%;
    max-width: 960px;
    margin: 28px auto 18px;
    padding: 0 20px;
    box-sizing: border-box;
    text-align: center;
    opacity: 0.72;
}

.site-footer-title {
    margin: 0 0 6px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.friend-links {
    display: inline;
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.friend-link {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.2s ease;
}

.friend-link:hover {
    color: var(--text-primary);
}

/* ─── Mobile Responsive ─── */

/* Tablet and large phones */
@media (max-width: 600px) {
    body {
        padding-top: 50px;
    }
    .hero-title {
        font-size: 3rem;
    }
    .btn-cta {
        font-size: 1.2rem;
        padding: 18px;
    }
}

/* Standard phones (375–480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2.6rem;
        letter-spacing: -1px;
    }
    .hero-subtitle-top {
        font-size: 1.2rem;
    }
    .result-name {
        font-size: 3rem;
    }
    .result-icon {
        font-size: 4.5rem;
    }
    .result-card {
        padding: 30px 16px;
    }
    .container {
        padding: 16px;
    }
    .question-text {
        font-size: 1.15rem;
    }
    .site-footer {
        margin-top: 20px;
        padding: 0 16px 8px;
    }
    .friend-link {
        display: inline-block;
        margin: 0 6px;
    }
}

/* Small phones (< 375px) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-cta-text {
        font-size: 1.1rem;
    }
    .result-name {
        font-size: 2.5rem;
    }
    .btn-cta {
        font-size: 1.1rem;
        padding: 16px;
    }
}

/* Social Share Row */
.social-share-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.social-btn {
    flex: 1;
    display: block;
    padding: 12px 8px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.social-btn:hover, .social-btn:active {
    opacity: 0.85;
    transform: scale(1.03);
}

.twitter-btn {
    background-color: #000000;
    color: #ffffff;
}

.facebook-btn {
    background-color: #1877F2;
    color: #ffffff;
}

/* 1627 Disclaimer Block */
.types-disclaimer {
    background: rgba(255, 87, 34, 0.08);
    border: 1px solid rgba(255, 87, 34, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.disclaimer-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--sbti-orange);
    margin-right: 6px;
    vertical-align: middle;
}
