:root {
    /* Color Palette */
    --color-bg-primary: #F4F7F6; /* Soft gray/white background */
    --color-bg-card: #FFFFFF;
    
    --color-text-primary: #1A2421; /* Deep green-black */
    --color-text-secondary: #5C6B66; /* Muted green-gray */
    --color-text-accent: #2A9D8F; /* Teal accent */

    --color-primary: #264653; /* Deep Blue-Green */
    --color-secondary: #2A9D8F; /* Refreshing Teal */
    --color-accent: #E9C46A; /* Warm Gold */
    --color-error: #E76F51; /* Soft Red */
    
    --color-border: #E0E7E5;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;

    /* Typography */
    --font-family-base: 'Inter', 'Noto Sans JP', sans-serif;
    
    /* Effects */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 10px 15px -3px rgba(38, 70, 83, 0.1), 0 4px 6px -2px rgba(38, 70, 83, 0.05);
    --radius-md: 12px;
    --radius-lg: 20px;
}

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

body {
    font-family: var(--font-family-base);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--spacing-md);
}

#app {
    width: 100%;
    max-width: 600px;
    background-color: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
    min-height: 400px; /* Ensure visual stability */
    display: flex;
    flex-direction: column;
}

/* Common Layouts */
.screen {
    padding: var(--spacing-xl);
    flex: 1;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease-out forwards;
}

.screen-header {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.screen-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.screen-description {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.screen-content {
    flex: 1;
    margin-bottom: var(--spacing-xl);
}

.screen-actions {
    margin-top: auto;
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-out {
    animation: fadeOut 0.3s ease-in forwards;
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px; /* Pill shape */
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 160px;
}

.btn-primary {
    background-color: var(--color-secondary);
    color: white;
    box-shadow: 0 4px 6px rgba(42, 157, 143, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(42, 157, 143, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text-secondary);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-text-secondary);
    color: var(--color-text-primary);
}

/* Form Elements */
.question-group {
    margin-bottom: var(--spacing-lg);
    background: var(--color-bg-primary);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

.question-text {
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.options {
    display: flex;
    gap: var(--spacing-md);
}

label.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: var(--spacing-sm);
    color: var(--color-text-secondary);
}

/* Utility */
.hidden {
    display: none !important;
}

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

.text-accent {
    color: var(--color-text-accent);
}
