:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent: #6366f1;
    --accent-soft: #e0e7ff;
    --danger: #ef4444;
    --success: #22c55e;
    --border: #e2e8f0;
    --radius: 16px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 500px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
}

h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.button-grid.compact {
    grid-template-columns: repeat(3, 1fr);
}

.choice-btn {
    appearance: none;
    background: var(--bg-color);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 12px 8px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.choice-btn.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.emoticon-scale {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.emotion-btn {
    background: var(--bg-color);
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1.5rem;
    padding: 8px;
    flex: 1;
    cursor: pointer;
    transition: all 0.2s;
}

.emotion-btn.selected {
    border-color: var(--accent);
    transform: scale(1.1);
    background: var(--accent-soft);
}

.submit-btn {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: filter 0.2s;
}

.submit-btn:active {
    filter: brightness(0.9);
}

.hidden {
    display: none;
}

/* Results */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.text-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
}

.block {
    margin-bottom: 20px;
}

.highlight-box {
    background: var(--accent-soft);
    padding: 16px;
    border-radius: 12px;
    color: var(--accent);
    font-weight: 600;
}

blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 15px;
    font-style: italic;
    color: var(--text-primary);
    font-size: 1.1rem;
}

ul {
    list-style: none;
}

li::before {
    content: "• ";
    color: var(--danger);
    font-weight: bold;
}

/* History */
.history-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.history-event {
    font-weight: 600;
    font-size: 0.95rem;
}

.history-advice {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

@media (max-width: 400px) {
    .button-grid.compact {
        grid-template-columns: 1fr 1fr;
    }
}
