.sbti-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.start-page {
    text-align: center;
}

.start-page h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.start-page .subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 40px;
}

.start-page .deco-line {
    width: 60px;
    height: 3px;
    background: var(--fg);
    margin: 0 auto 40px;
}

.start-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.btn-start {
    display: inline-block;
    padding: 14px 48px;
    border: 2px solid var(--fg);
    background: var(--fg);
    color: var(--bg);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.btn-start:hover {
    background: var(--bg);
    color: var(--fg);
}

.btn-gallery {
    display: inline-block;
    padding: 14px 48px;
    border: 2px solid var(--fg);
    background: var(--bg);
    color: var(--fg);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.btn-gallery:hover {
    background: var(--fg);
    color: var(--bg);
}

.question-page {
    text-align: center;
    width: 100%;
    display: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.question-page.fade-out {
    opacity: 0;
    transform: translateX(-20px);
}

.question-page.fade-in {
    opacity: 1;
    transform: translateX(0);
}

.progress-bar {
    width: 100%;
    height: 3px;
    background: var(--light-border);
    margin-bottom: 40px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--fg);
    transition: width 0.4s ease;
}

.question-number {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.question-text {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 36px;
    line-height: 1.6;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 400px;
    margin: 0 auto;
}

.option-btn {
    padding: 16px 20px;
    border: 2px solid var(--fg);
    background: var(--bg);
    color: var(--fg);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    line-height: 1.5;
}

.option-btn:hover {
    background: var(--fg);
    color: var(--bg);
}

.option-btn:active {
    transform: scale(0.97);
}

.option-btn .option-label {
    font-weight: bold;
    margin-right: 8px;
}

.result-page {
    text-align: center;
    width: 100%;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.result-page.revealed {
    opacity: 1;
    transform: translateY(0);
}

.result-page .result-type,
.result-page .result-badge,
.result-page .result-match,
.result-page .result-desc,
.result-page .dimension-section,
.result-page .radar-canvas,
.result-page .result-actions {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.result-page.revealed .result-type,
.result-page.revealed .result-badge,
.result-page.revealed .result-match,
.result-page.revealed .result-desc,
.result-page.revealed .dimension-section,
.result-page.revealed .radar-canvas,
.result-page.revealed .result-actions {
    opacity: 1;
    transform: translateY(0);
}

.result-type {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 3px;
}

.result-badge {
    display: inline-block;
    border: 2px solid var(--fg);
    padding: 4px 16px;
    font-size: 0.85rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.result-match {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 30px;
}

.result-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--muted);
    max-width: 380px;
    margin: 0 auto 30px;
}

.dimension-section {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 40px;
    text-align: left;
}

.dimension-section h3 {
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1.5px solid var(--fg);
    letter-spacing: 1px;
}

.dimension-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.dimension-name {
    width: 90px;
    flex-shrink: 0;
    color: var(--muted);
}

.dimension-bar-bg {
    flex: 1;
    height: 8px;
    background: var(--light-border);
    position: relative;
}

.dimension-bar-fill {
    height: 100%;
    background: var(--fg);
    transition: width 0.6s ease;
}

.dimension-val {
    width: 30px;
    text-align: right;
    flex-shrink: 0;
    font-weight: bold;
    margin-left: 8px;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 280px;
    margin: 0 auto;
}

.btn-retry {
    padding: 14px 0;
    border: 2px solid var(--fg);
    background: var(--fg);
    color: var(--bg);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.btn-retry:hover {
    background: var(--bg);
    color: var(--fg);
}

.btn-share {
    padding: 14px 0;
    border: 2px solid var(--fg);
    background: var(--bg);
    color: var(--fg);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.btn-share:hover {
    background: var(--fg);
    color: var(--bg);
}

.btn-save {
    padding: 14px 0;
    border: 2px dashed var(--muted);
    background: var(--bg);
    color: var(--muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.btn-save:hover {
    border-style: solid;
    border-color: var(--fg);
    color: var(--fg);
}

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--fg);
    color: var(--bg);
    padding: 12px 28px;
    font-size: 0.95rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}

/* ===== Radar Chart ===== */
.radar-canvas {
    display: block;
    margin: 0 auto 30px;
    max-width: 280px;
}

/* ===== Gallery Page ===== */
.gallery-page {
    display: none;
    width: 100%;
}

.gallery-header {
    text-align: center;
    margin-bottom: 30px;
}

.gallery-header h2 {
    font-size: 1.6rem;
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.gallery-subtitle {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 20px;
}

.btn-back-gallery {
    display: inline-block;
    padding: 10px 32px;
    border: 2px solid var(--fg);
    background: var(--bg);
    color: var(--fg);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-back-gallery:hover {
    background: var(--fg);
    color: var(--bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-width: 500px;
    margin: 0 auto;
}

.gallery-card {
    border: 2px solid var(--fg);
    padding: 16px 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.gallery-card:hover {
    background: var(--fg);
    color: var(--bg);
}

.gallery-card:hover .gallery-card-code {
    border-color: var(--bg);
    color: var(--bg);
}

.gallery-card:hover .gallery-badge {
    border-color: var(--bg);
    color: var(--bg);
}

.gallery-card-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.gallery-card-code {
    display: inline-block;
    font-size: 0.75rem;
    border: 1px solid var(--fg);
    padding: 1px 8px;
    letter-spacing: 1px;
    margin-bottom: 8px;
    transition: all 0.25s ease;
}

.gallery-card-desc {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: all 0.3s ease;
}

.gallery-card.expanded .gallery-card-desc {
    -webkit-line-clamp: unset;
}

.gallery-card:hover .gallery-card-desc {
    color: var(--bg);
}

.gallery-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.65rem;
    border: 1px solid var(--fg);
    padding: 1px 6px;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
}

.gallery-badge-hidden {
    border-style: dashed;
}

@media (max-width: 480px) {
    .start-page h1 {
        font-size: 2rem;
    }

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

    .result-type {
        font-size: 1.8rem;
    }

    .dimension-name {
        width: 75px;
        font-size: 0.8rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
