/* ===== Base Styles ===== */
:root {
    --primary-color: #e8a4b8;
    --primary-dark: #d47a95;
    --secondary-color: #b8a4e8;
    --accent-color: #f5e6ea;
    --text-dark: #4a3f4d;
    --text-light: #7a6f7d;
    --bg-gradient: linear-gradient(135deg, #fdf6f8 0%, #f8f0f5 50%, #f5f0f8 100%);
    --card-shadow: 0 10px 40px rgba(232, 164, 184, 0.2);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.8;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* ===== Screen Transitions ===== */
.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

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

/* ===== Start Screen ===== */
#start-screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 40px);
}

.start-content {
    text-align: center;
    padding: 40px 20px;
}

.logo {
    font-size: 3rem;
    margin-bottom: 20px;
    position: relative;
}

.logo .fa-heart {
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

.logo .fa-book-open {
    color: var(--secondary-color);
    font-size: 2rem;
    position: absolute;
    right: calc(50% - 60px);
    top: 10px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

h1 {
    font-family: 'Noto Serif JP', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 30px;
    font-weight: 500;
}

.description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 40px;
    line-height: 2;
}

/* ===== Buttons ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(232, 164, 184, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(232, 164, 184, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--primary-dark);
    border: 2px solid var(--primary-color);
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

/* ===== Question Screen ===== */
#question-screen {
    padding-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(232, 164, 184, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0%;
}

.question-number {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.question-number span {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.2rem;
}

.question-content {
    background: white;
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: var(--card-shadow);
}

.question-text {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.3rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 35px;
    line-height: 1.8;
    color: var(--text-dark);
}

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

.answer-btn {
    background: var(--accent-color);
    border: 2px solid transparent;
    padding: 18px 20px;
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-size: 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.answer-btn:hover {
    border-color: var(--primary-color);
    background: white;
    transform: translateX(5px);
}

.answer-btn .option-label {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.answer-btn .option-text {
    flex: 1;
}

/* ===== Result Screen ===== */
#result-screen {
    padding-bottom: 40px;
}

.result-content {
    animation: fadeIn 0.6s ease;
}

.result-header {
    text-align: center;
    padding: 30px 20px;
}

.result-label {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 15px;
}

.result-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.philosopher-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(232, 164, 184, 0.3);
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--accent-color), #f5f0f8);
}

.philosopher-name {
    font-family: 'Noto Serif JP', serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.type-name {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 500;
}

.result-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
}

.philosophy-quote {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, rgba(232, 164, 184, 0.1), rgba(184, 164, 232, 0.1));
    border-radius: 16px;
    margin-bottom: 25px;
    position: relative;
}

.philosophy-quote .fa-quote-left {
    color: var(--primary-color);
    font-size: 1.5rem;
    opacity: 0.5;
    position: absolute;
    top: 15px;
    left: 20px;
}

.philosophy-quote p {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.8;
}

.result-description {
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 2;
    margin-bottom: 25px;
}

.result-description p {
    margin-bottom: 15px;
}

.deep-question {
    background: linear-gradient(135deg, var(--accent-color), #f5f0f8);
    padding: 25px;
    border-radius: 16px;
    border-left: 4px solid var(--secondary-color);
}

.deep-question h3 {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.deep-question p {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.1rem;
    color: var(--text-dark);
    font-style: italic;
}

/* ===== Compatibility Section ===== */
.compatibility-section {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
}

.compatibility-section h3,
.all-compatibility h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.compatibility-section h3 .fa-heart {
    color: var(--primary-color);
}

.best-matches {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.match-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--accent-color);
    border-radius: 12px;
}

.match-percent {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 10px 15px;
    border-radius: 10px;
    min-width: 65px;
    text-align: center;
}

.match-info {
    flex: 1;
}

.match-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

.match-type {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ===== All Compatibility Chart ===== */
.all-compatibility {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
}

.all-compatibility h3 .fa-chart-bar {
    color: var(--secondary-color);
}

.compatibility-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.compat-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.compat-label {
    min-width: 120px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.compat-bar-container {
    flex: 1;
    height: 24px;
    background: rgba(232, 164, 184, 0.15);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.compat-bar {
    height: 100%;
    border-radius: 12px;
    transition: width 1s ease;
    position: relative;
}

.compat-bar.high {
    background: linear-gradient(90deg, #e8a4b8, #d47a95);
}

.compat-bar.medium {
    background: linear-gradient(90deg, #b8a4e8, #9b8ad8);
}

.compat-bar.low {
    background: linear-gradient(90deg, #c8c0d0, #a8a0b0);
}

.compat-value {
    min-width: 45px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    text-align: right;
}

/* ===== Share Section ===== */
.share-section {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
    text-align: center;
}

.share-section h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.share-section h3 .fa-share-alt {
    color: var(--primary-color);
}

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

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

/* X (Twitter) */
.share-x {
    background: #000000;
}

.share-x:hover {
    background: #333333;
}

/* Threads */
.share-threads {
    background: linear-gradient(45deg, #000000, #333333);
}

.share-threads:hover {
    background: linear-gradient(45deg, #333333, #555555);
}

/* LINE */
.share-line {
    background: #06C755;
}

.share-line:hover {
    background: #05b04c;
}

/* ===== Result Actions ===== */
.result-actions {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

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

    h1 {
        font-size: 1.8rem;
    }

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

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

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

    .philosopher-name {
        font-size: 2rem;
    }

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

    .compat-label {
        min-width: 90px;
        font-size: 0.8rem;
    }

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

    .share-btn {
        justify-content: center;
    }
}
