:root {
    --primary: #FFB7B2;
    --secondary: #E2F0CB;
    --accent: #FFDAC1;
    --bg: #F9F9F9;
    --text: #333333;
    --card-bg: rgba(255, 255, 255, 0.9);
    --font: 'Nunito', 'M PLUS Rounded 1c', sans-serif;
    --shadow: 0 8px 30px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    color: var(--text);
    line-height: 1.6;
}

.container { max-width: 600px; margin: 0 auto; padding: 20px; }
h1, h2, h3 { color: #555; text-align: center; }

/* Header & Nav */
.global-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 20px; background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky; top: 0; z-index: 1000;
}
.header-logo { text-decoration: none; color: var(--primary); font-weight: 900; font-size: 1rem; display: flex; align-items: center; gap: 5px; flex-shrink: 1; }
.header-nav { display: none; }
.menu-toggle {
    background: #f8f9fa; border: 1px solid #eee; font-size: 1.2rem; cursor: pointer; color: #555; padding: 5px 10px; border-radius: 8px;
}

@media(min-width: 768px) {
    .header-nav { display: flex; gap: 20px; }
    .header-nav a { text-decoration: none; color: #555; font-weight: bold; font-size: 0.9rem; }
    .header-nav a:hover { color: var(--primary); }
    .menu-toggle { display: none; }
    .header-logo { font-size: 1.2rem; }
}

.mobile-menu {
    display: none; flex-direction: column; background: white; padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); position: absolute; top: 60px; left: 0; right: 0;
    z-index: 999;
}
.mobile-menu.active { display: flex; }
.mobile-menu a {
    text-decoration: none; color: #333; font-weight: bold; padding: 12px 0;
    border-bottom: 1px solid #eee;
}

/* Card */
.glass-card {
    background: var(--card-bg); border-radius: 20px; padding: 20px; margin-bottom: 20px;
    box-shadow: var(--shadow); backdrop-filter: blur(10px);
}

.fade-in { animation: fadeIn 0.6s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.section-title { font-size: 1.1rem; border-left: 5px solid var(--primary); padding-left: 10px; margin: 25px 0 12px 0; color: #444; font-weight: bold; clear: both;}

/* Ecology List - FIXED BLOCK LAYOUT */
.ecology-list { list-style: none; padding: 0; margin-bottom: 25px; display: block !important; clear: both !important; }
.ecology-list li { 
    background: #fff; padding: 15px 15px 15px 45px; margin-bottom: 12px; border-radius: 12px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.03); position: relative; line-height: 1.8; color: #444; 
    text-align: left; display: block !important; clear: both !important; width: 100% !important;
}
.ecology-list li::before { content: "💬"; position: absolute; left: 12px; top: 14px; font-size: 1.2rem; display: block; }

.btn {
    display: block; width: 100%; text-align: center; padding: 15px;
    border-radius: 30px; font-weight: bold; text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s; border: none; cursor: pointer; font-size: 1.1rem;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), #ff9a9e); color: white; box-shadow: 0 4px 15px rgba(255, 183, 178, 0.4); }
.btn-secondary { background: white; color: #ff8b94; border: 2px solid var(--primary); }

.type-image { width: 100%; max-width: 300px; display: block; margin: 0 auto 20px auto; border-radius: 15px; }
.catchphrase { font-size: 1.2rem; color: var(--primary); font-weight: 800; text-align: center; margin-bottom: 10px;}
.type-name { font-size: 2.2rem; color: #333; font-weight: 900; text-align: center; margin-bottom: 20px; line-height: 1.2;}

/* Diagnosis Inputs */
.name-input {
    width: 100%; padding: 15px 20px; border-radius: 15px; border: 2px solid #eee;
    font-size: 1rem; font-family: var(--font); outline: none; transition: border-color 0.3s;
    background: #fdfdfd; text-align: center; font-weight: bold;
}
.name-input:focus { border-color: var(--primary); background: #fff; }
.select-input {
    width: 100%; padding: 12px; border-radius: 12px; border: 1px solid #ddd;
    font-size: 0.95rem; font-family: var(--font); background: #fff; text-align: center;
}
.select-input-label { display: block; font-size: 0.8rem; color: #888; font-weight: bold; margin-bottom: 8px; text-align: center; }

/* Question UI */
.option-btn {
    display: block; width: 100%; padding: 16px; margin-bottom: 12px;
    background: #fff; border: 2px solid #f0f0f0; border-radius: 15px;
    font-size: 0.95rem; font-weight: 600; color: #555; cursor: pointer;
    transition: all 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    text-align: left; position: relative;
}
.option-btn:hover { background: #fffcfc; border-color: var(--primary); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.option-btn.selected { 
    background: #fffafa; border-color: var(--primary); color: #d65c65; 
    box-shadow: 0 4px 15px rgba(255,183,178,0.25);
}
.option-btn.selected::after {
    content: '✨'; position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
}

.ads-box { margin: 20px 0; text-align: center; display: block; clear: both; overflow: hidden; }

.match-box { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px;}
.match-item { flex: 1; background: white; padding: 15px; border-radius: 15px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05);}
.share-btn { display: flex; justify-content: center; align-items: center; background: #000; color: #fff; text-decoration: none; font-weight: bold; padding: 15px; border-radius: 30px; margin-top: 25px;}

.banner { background: #333; text-align: center; padding: 12px; margin-bottom: 20px; border-radius: 12px; text-decoration: none; display: block; color: #fff; font-weight: bold; }

.question-view { display: none; }
.question-view.active { display: block; animation: slideInRight 0.4s ease-out; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
footer { margin-top:40px; margin-bottom:20px; text-align:center; font-size:0.8rem; color:#aaa; border-top:1px solid #eee; padding-top:20px; }