/* =========================================
   1. Global Variables & Reset
   ========================================= */
:root {
    /* --- Main Theme Colors (Apple Inspired) --- */
    --primary-color: #E10080;       /* メイン：ダスティピンク */
    --text-color: #1D1D1F;          /* テキスト：チャコールグレー */
    --text-light: #6e6e73;          /* サブテキスト：グレー */
    --background-light: #F5F5F7;    /* 背景：ライトグレー */
    --background-white: #FFFFFF;    /* 背景：白 */
    --link-color: #0066CC;          /* リンク：ブルー */
    --border-color: #d2d2d7;        /* ボーダー */

    /* --- Sub Theme Colors (Fortune/Psychology) --- */
    /* 新規追加セクション用の紫系カラーを変数化 */
    --accent-purple: #6a11cb;       /* 占い・監修者用メイン紫 */
    --accent-purple-hover: #5a0eb3; /* 紫ホバー時 */
    --accent-purple-light: #e0cffc; /* 紫系薄いボーダー・背景 */
    --bg-purple-light: #f9f6ff;     /* 極薄い紫背景 */

    /* --- Typography --- */
    --font-family-base: "ヒラギノ角ゴシック", "Hiragino Sans", "Noto Sans JP", sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    color: var(--text-color);
    background-color: var(--background-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 17px;
}

/* =========================================
   2. Utility & Layout Components
   ========================================= */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.hidden { display: none !important; }
.ml-2 { margin-left: 8px; }
.mr-2 { margin-right: 8px; }

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.3;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover { opacity: 0.8; }

/* =========================================
   3. Buttons
   ========================================= */
.btn-primary,
.btn-outline,
.test-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    border: 1px solid transparent;
}

.btn-primary,
.test-button {
    background-color: var(--primary-color);
    color: var(--background-white);
}

.btn-primary:hover,
.test-button:hover {
    background-color: #9a606d;
    opacity: 1;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--background-white);
    opacity: 1;
}

.btn-disabled {
    background-color: #ccc !important;
    color: #666 !important;
    border-color: #ccc !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* =========================================
   4. Cards & Grid
   ========================================= */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.card {
    background-color: var(--background-white);
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

/* =========================================
   5. Main Sections
   ========================================= */

/* --- Hero Section --- */
.hero {
    padding: 120px 0 140px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: #000;
    color: var(--background-white);
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-content h1 {
    font-size: 56px;
    margin-bottom: 25px;
    line-height: 1.1;
    text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-description {
    font-size: 21px;
    color: #f5f5f5;
    margin-bottom: 40px;
    text-shadow: 0px 1px 5px rgba(0, 0, 0, 0.5);
}

.hero .test-button {
    font-size: 18px;
    padding: 16px 40px;
}

/* --- Common Section Styles --- */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
}

.section-description {
    text-align: center;
    margin-bottom: 60px;
    font-size: 18px;
    color: var(--text-light);
}

/* --- Breadcrumb --- */
.breadcrumb {
    background-color: var(--background-white);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}
.breadcrumb ul {
    list-style: none;
    display: flex;
    font-size: 14px;
}
.breadcrumb li { color: var(--text-light); }
.breadcrumb li:not(:last-child)::after {
    content: '>';
    margin: 0 10px;
}

/* --- Features Section --- */
.features { padding: 100px 0; }
.features .card-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature-icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.features h3 { font-size: 20px; margin-bottom: 15px; }

/* --- Test List Section --- */
#tests {
    padding: 100px 0;
    background-color: var(--background-light);
}
#tests .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
#tests .card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-color);
    text-align: center;
}
#tests .card p { margin-bottom: 30px; flex-grow: 1; }
#tests .card .btn-primary,
#tests .card .btn-outline,
#tests .card .btn-disabled { width: 100%; }
.theme-color-icon {
    font-size: 32px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}

/* --- Types & Columns --- */
.types { padding: 100px 0; }
.types .card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-color);
    text-align: center;
}

.columns-section {
    padding: 100px 0;
    background-color: var(--background-light);
}
.columns-section .card-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.columns-section .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.columns-section .card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-color);
}
.columns-section .card p { margin-bottom: 30px; flex-grow: 1; }
.columns-section .card .btn-outline { width: 100%; }

/* --- CTA Section --- */
.test-cta-section {
    padding: 100px 0;
    text-align: center;
}
.test-cta-section h2 { font-size: 32px; margin-bottom: 30px; }
.test-cta-section .test-button { font-size: 20px; padding: 18px 60px; }

/* =========================================
   6. Content Enhancements (E-E-A-T & AEO)
   ========================================= */

/* --- Intro & Supervisor Section --- */
.intro-section {
    padding: 40px 0 30px;
    background-color: var(--background-white);
}

.intro-text {
    margin-bottom: 30px;
    line-height: 1.8;
    color: #555;
}

.intro-text h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 700;
}

.supervisor-box {
    background-color: var(--bg-purple-light);
    padding: 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 25px;
    border: 1px solid var(--accent-purple-light);
    max-width: 800px;
    margin: 0 auto;
}

.supervisor-image img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.supervisor-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--accent-purple);
    font-size: 0.9rem;
}

.supervisor-info p {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- FAQ Section --- */
.faq-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
}

.faq-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.faq-question {
    font-weight: bold;
    padding: 20px;
    margin: 0;
    display: block;
    color: #333;
    position: relative;
    cursor: pointer;
    list-style: none;
}
/* Safari Default Icon Hide */
.faq-question::-webkit-details-marker { display: none; }

/* Accordion Icon */
.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--accent-purple);
    transition: content 0.2s;
}

.faq-item[open] .faq-question::after { content: '-'; }

.faq-answer {
    padding: 0 20px 20px;
    line-height: 1.7;
    border-top: 1px solid #eee;
    padding-top: 15px;
    color: #555;
}

/* =========================================
   7. Test Logic & Results System
   ========================================= */
#test-section,
#loading-section,
#results-section {
    padding: 60px 0;
    min-height: 80vh;
    background-color: var(--background-light);
}

.test-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px;
    background-color: var(--background-white);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.test-navigation { margin-bottom: 30px; }
.back-link { font-size: 16px; color: var(--text-light); }

/* Progress Bar */
.progress-container { margin-bottom: 40px; }
.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}
#question-number { font-weight: 600; }
.progress-bar-bg {
    background-color: #e5e5ea;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}
#test-progress {
    background-color: var(--primary-color);
    height: 100%;
    transition: width 0.5s ease-in-out;
    border-radius: 10px;
}

/* Questions */
.question-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
    line-height: 1.4;
}
.options-container { display: flex; flex-direction: column; gap: 15px; }
.option-label {
    display: block;
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.option-label:hover {
    border-color: var(--primary-color);
    background-color: rgba(176, 119, 132, 0.05);
}
input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.2);
    accent-color: var(--primary-color);
}
.test-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
}

/* Loading */
.loading-section { text-align: center; padding: 60px 20px; }
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Results */
.result-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}
#result-icon { font-size: 48px; color: var(--primary-color); margin-bottom: 15px; }
.result-title { font-size: 32px; font-weight: 700; }
.result-subtitle { font-size: 18px; color: var(--text-light); }
.result-section { margin-bottom: 40px; }
.result-section-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
    display: flex;
    align-items: center;
}
.result-section-title i { margin-right: 12px; color: var(--primary-color); }

.advice-list { list-style-type: none; padding-left: 0; }
.advice-list li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
}
.advice-list li::before {
    content: "\f00c"; /* FontAwesome Check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* Share & Actions */
.result-actions {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}
.share-section { text-align: center; margin-bottom: 40px; }
.share-title { font-weight: 600; margin-bottom: 15px; font-size: 18px; }
.share-buttons { display: flex; justify-content: center; gap: 20px; }
.share-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}
.share-twitter { background-color: #1DA1F2; }
.share-facebook { background-color: #4267B2; }
.share-line { background-color: #00C300; }
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

/* =========================================
   8. Recommendation & Uranai Section
   ========================================= */

/* Section Container */
.recommendation-section {
    margin-top: 2rem;
    padding: 24px;
    background-color: #f9f9f9;
    border-radius: 8px;
    text-align: center;
    border: 2px dashed var(--accent-purple-light);
}

.recommendation-section .result-section-title {
    margin-bottom: 15px;
    justify-content: center; /* Center align title in this block */
}

.recommendation-section .result-section-title i {
    color: var(--accent-purple);
    margin-right: 8px;
}

/* Simple Recommendation Card */
.recommendation-card .recommendation-icon {
    font-size: 2rem;
    color: var(--accent-purple);
    margin-bottom: 10px;
}
.recommendation-card h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    font-weight: 700;
    color: #333;
}
.recommendation-card p {
    margin-bottom: 20px;
    font-size: 1rem;
    color: #555;
}
.recommendation-card .btn-primary {
    /* Override primary to match purple theme here if desired, or keep generic */
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 700;
    display: inline-block;
}

/* Uranai (Fortune) Card Style */
.uranai-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
    transition: transform 0.3s ease;
}

.uranai-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.uranai-card-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 250px;
}

.uranai-card-body { padding: 20px; }

.uranai-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--accent-purple-light);
    padding-bottom: 8px;
    display: inline-block;
}

.uranai-card-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.uranai-read-more {
    display: inline-block;
    background-color: var(--accent-purple);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.uranai-read-more:hover {
    background-color: var(--accent-purple-hover);
    text-decoration: none;
    color: #fff;
}

/* =========================================
   9. Footer
   ========================================= */
.site-footer {
    background-color: var(--background-light);
    color: var(--text-light);
    padding: 60px 0 30px;
    font-size: 14px;
}
.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 40px;
}
.footer-section h3 {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 15px;
    font-weight: 500;
}
.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 10px; }
.footer-section a { color: var(--text-light); }
.footer-section a:hover {
    color: var(--text-color);
    text-decoration: underline;
}
.footer-bottom {
    padding-top: 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.back-to-top.visible { opacity: 1; visibility: visible; }

/* =========================================
   10. Responsive Design
   ========================================= */
@media (max-width: 768px) {
    body { font-size: 16px; }

    /* Layout Adjustments */
    .hero { padding: 100px 0; }
    .hero-content h1 { font-size: 32px; }
    .hero-description { font-size: 16px; }
    .section-title h2 { font-size: 28px; }

    .features, #tests, .types, .columns-section, .test-cta-section {
        padding: 80px 0;
    }

    .footer-content { flex-direction: column; }

    /* Test & Components */
    .test-container { padding: 30px; }
    .question-title { font-size: 22px; }
    .test-nav-buttons {
        flex-direction: column-reverse;
        gap: 15px;
    }
    .test-nav-buttons button { width: 100%; }

    /* Supervisor Section */
    .supervisor-box {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .supervisor-info { text-align: left; }
}