/* ==========================================
   Global Styles & Reset
   ========================================== */

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

:root {
    /* Parisian Colors - Elegant & Sophisticated */
    --primary: #C4A57B;        /* Champagne Gold - シャンパンゴールド */
    --primary-light: #E5D4B5;  /* Light Champagne */
    --primary-dark: #9B7F5C;   /* Deep Gold */
    --secondary: #2C3E50;      /* Paris Night Blue - パリの夜空 */
    --secondary-light: #4A6278;/* Soft Navy */
    --accent: #E8B4B8;         /* Rose Poudré - パウダーローズ */
    --success: #7C9885;        /* Sage Green - セージグリーン */
    --text-dark: #2C2C2C;      /* Charcoal */
    --text-medium: #5A5A5A;    /* Medium Gray */
    --text-light: #8A8A8A;     /* Light Gray */
    --bg-light: #FAF8F5;       /* Cream White - クリームホワイト */
    --bg-white: #FFFFFF;
    --border: #E8E3DC;         /* Soft Beige Border */
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    background: var(--bg-light);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ==========================================
   Hero Section
   ========================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 50%, var(--accent) 100%);
    z-index: -2;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(196, 165, 123, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(232, 180, 184, 0.2) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(30px, -30px);
    }
}

.hero-content {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-md);
    max-width: 900px;
}

.hero-title {
    margin-bottom: var(--spacing-lg);
}

.hero-subtitle {
    display: block;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: var(--spacing-sm);
    opacity: 0.95;
    letter-spacing: 0.05em;
}

.hero-main {
    display: block;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.3;
    margin-top: var(--spacing-md);
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
}

.cta-button {
    background: white;
    color: var(--secondary);
    border: 2px solid var(--primary);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    font-family: 'Noto Sans JP', sans-serif;
}

.cta-button:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 25px 35px -5px rgba(196, 165, 123, 0.4);
}

.cta-button i {
    font-size: 1.2rem;
}

/* ==========================================
   Introduction Section
   ========================================== */

.introduction {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-white);
}

.intro-card {
    background: var(--bg-white);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.intro-card h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-xl);
    text-align: center;
    color: var(--text-dark);
}

.intro-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.step {
    text-align: center;
    padding: var(--spacing-lg);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto var(--spacing-md);
    box-shadow: var(--shadow-md);
}

.step p {
    color: var(--text-medium);
    line-height: 1.7;
}

.important-note {
    background: linear-gradient(135deg, rgba(196, 165, 123, 0.15), rgba(232, 180, 184, 0.15));
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.important-note i {
    font-size: 1.5rem;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.important-note p {
    color: var(--text-medium);
    line-height: 1.8;
}

/* ==========================================
   Diagnosis Section
   ========================================== */

.diagnosis {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-light);
}

/* Progress Bar */
.progress-container {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: var(--spacing-md);
    z-index: 100;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.progress-label {
    font-weight: 600;
    color: var(--text-dark);
}

.progress-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    width: 0%;
}

/* Part Section */
.part-section {
    background: var(--bg-white);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.part-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.part-header {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--bg-light);
}

.part-number {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-lg);
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

.part-info {
    flex: 1;
}

.part-title {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.part-description {
    color: var(--text-medium);
    line-height: 1.7;
}

/* Subsection */
.subsection {
    margin-bottom: var(--spacing-xl);
}

.subsection-title {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-sm);
    border-left: 3px solid var(--primary);
}

/* Checklist Items */
.checklist-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.checklist-item:hover {
    background: var(--bg-light);
}

.checklist-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: var(--bg-white);
}

.checklist-item input[type="checkbox"]:checked ~ .checkbox-custom {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: var(--primary);
    animation: checkBounce 0.3s ease;
}

.checklist-item input[type="checkbox"]:checked ~ .checkbox-custom::after {
    content: '✓';
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

@keyframes checkBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.item-text {
    color: var(--text-medium);
    line-height: 1.6;
    flex: 1;
}

.checklist-item input[type="checkbox"]:checked ~ .item-text {
    color: var(--text-dark);
    font-weight: 500;
}

/* Part Score */
.part-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(196, 165, 123, 0.15), rgba(232, 180, 184, 0.15));
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-top: var(--spacing-lg);
    font-size: 1.1rem;
    font-weight: 600;
}

.score-value {
    color: var(--primary);
    font-size: 1.3rem;
}

/* Results Button */
.results-button-container {
    text-align: center;
    margin-top: var(--spacing-xl);
}

.results-button {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    border: none;
    padding: 1.25rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    font-family: 'Noto Sans JP', sans-serif;
}

.results-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 35px -5px rgba(44, 62, 80, 0.3);
}

.results-button i {
    font-size: 1.3rem;
}

/* ==========================================
   Results Modal
   ========================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    overflow-y: auto;
    padding: var(--spacing-lg);
    align-items: flex-start;
}

.modal.active {
    display: flex;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-2xl);
    max-width: 800px;
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: var(--bg-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-medium);
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--accent);
    color: white;
    transform: rotate(90deg);
}

.results-container {
    padding: var(--spacing-2xl);
}

.results-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--text-dark);
}

/* Total Score Circle */
.total-score {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
}

.score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-circle-bg {
    fill: none;
    stroke: var(--bg-light);
    stroke-width: 12;
}

.score-circle-fill {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 1s ease;
}

.score-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

.score-max {
    font-size: 1.5rem;
    color: var(--text-light);
}

/* Results Type */
.results-type {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, rgba(196, 165, 123, 0.15), rgba(232, 180, 184, 0.15));
    border-radius: var(--radius-xl);
}

.results-type h3 {
    font-size: 1.8rem;
    color: var(--secondary);
    margin-bottom: var(--spacing-md);
}

.results-type p {
    color: var(--text-medium);
    line-height: 1.8;
}

/* Part Breakdown */
.part-breakdown {
    margin-bottom: var(--spacing-xl);
}

.part-breakdown h4 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

.breakdown-chart {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.breakdown-label {
    min-width: 150px;
    font-weight: 500;
    color: var(--text-medium);
}

.breakdown-bar-container {
    flex: 1;
    height: 30px;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.breakdown-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    transition: width 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: var(--spacing-sm);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Next Steps */
.next-steps {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.next-steps h4 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

.next-steps p {
    color: var(--text-medium);
    line-height: 1.8;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.action-button {
    flex: 1;
    min-width: 200px;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
    font-family: 'Noto Sans JP', sans-serif;
}

.action-button.primary {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    box-shadow: var(--shadow-md);
}

.action-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.action-button.secondary {
    background: var(--bg-light);
    color: var(--text-dark);
}

.action-button.secondary:hover {
    background: var(--border);
}

/* ==========================================
   Message Section
   ========================================== */

.message-section {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-white);
}

.message-card {
    background: var(--bg-white);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.message-card h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-xl);
    text-align: center;
    color: var(--text-dark);
}

.message-content {
    max-width: 700px;
    margin: 0 auto;
}

.message-content p {
    color: var(--text-medium);
    line-height: 1.9;
    margin-bottom: var(--spacing-md);
}

.message-content .highlight {
    text-align: center;
    font-size: 1.2rem;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, rgba(196, 165, 123, 0.15), rgba(232, 180, 184, 0.15));
    border-radius: var(--radius-lg);
    margin: var(--spacing-lg) 0;
}

.signature {
    text-align: right;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--bg-light);
}

.signature p {
    margin-bottom: var(--spacing-xs);
}

/* ==========================================
   Footer
   ========================================== */

.footer {
    background: var(--text-dark);
    color: white;
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.footer p {
    opacity: 0.8;
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 768px) {
    .hero-main {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .intro-steps {
        grid-template-columns: 1fr;
    }
    
    .part-header {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .part-number {
        align-self: flex-start;
    }
    
    .part-title {
        font-size: 1.5rem;
    }
    
    .results-container {
        padding: var(--spacing-lg);
    }
    
    .results-title {
        font-size: 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-button {
        min-width: 100%;
    }
    
    .breakdown-label {
        min-width: 100px;
        font-size: 0.9rem;
    }
    
    .modal {
        padding: var(--spacing-sm);
    }
    
    .progress-container {
        position: relative;
        top: 0;
    }
}

@media (max-width: 480px) {
    .hero-main {
        font-size: 1.5rem;
    }
    
    .cta-button,
    .results-button {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .part-section {
        padding: var(--spacing-md);
    }
    
    .intro-card {
        padding: var(--spacing-md);
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
    }
    
    .score-number {
        font-size: 2.5rem;
    }
    
    .score-max {
        font-size: 1.2rem;
    }
}

/* ==========================================
   Utility Classes
   ========================================== */

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

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

/* ==========================================
   Animations
   ========================================== */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
}