:root {
    --background-color: #f4f4f4;
    --text-color: #333;
    --header-bg: #fff;
    --header-color: #333;
    --border-color: #e0e0e0;
    --card-bg: #fff;
    --button-bg: #333;
    --button-color: #fff;
    --footer-bg: #f9f9f9;
}

html[data-theme='dark'] {
    --background-color: #2c2c2c;
    --text-color: #f1f1f1;
    --header-bg: #333;
    --header-color: #f1f1f1;
    --border-color: #444;
    --card-bg: #383838;
    --button-bg: #555;
    --button-color: #fff;
    --footer-bg: #333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.site-header {
    background-color: var(--header-bg);
    color: var(--header-color);
    padding: 1rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
}

.tagline {
    margin: 0.5rem 0 0;
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.8;
}

#theme-toggle {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--button-bg);
    color: var(--button-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.site-main {
    padding: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.input-section {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

#problem-input {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.1rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    resize: vertical;
}

#decide-btn {
    align-self: flex-end;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: var(--button-bg);
    color: var(--button-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.result-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.result-section h3 {
    margin-top: 0;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.result-section .result-item {
    margin-bottom: 1.5rem;
}

.result-section .result-item:last-child {
    margin-bottom: 0;
}

.ad-section {
    margin-bottom: 2rem;
    text-align: center;
}

.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    background-color: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
}

.site-footer {
    background-color: var(--footer-bg);
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.related-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.related-links a {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.8;
}
.related-links a:hover {
    text-decoration: underline;
}

/* --- Result Page Specific Styles --- */
.logo-link {
    text-decoration: none;
    color: inherit;
}

.result-page h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.result-page > section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.result-page h3 {
    margin-top: 0;
    font-size: 1.4rem;
    color: var(--text-color);
}

.result-page .intro-section p {
    font-size: 1.1rem;
    line-height: 1.7;
}

.comparison-section .options {
    display: flex;
    gap: 2rem;
}

.comparison-section .options > div {
    flex: 1;
}

.comparison-section h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.recommendation-section p:first-of-type {
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    color: #007bff;
}

html[data-theme='dark'] .recommendation-section p:first-of-type {
    color: #3498db;
}

.recommendation-section .reason {
    font-size: 1rem;
    opacity: 0.9;
}

.action-section p {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
}