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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background: #fafafa;
}

.hidden {
    display: none !important;
}

/* Intro Screen */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.intro-content {
    max-width: 500px;
    padding: 2rem;
    text-align: left;
}

.intro-content h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.intro-content p {
    margin-bottom: 1rem;
}

/* Header */
header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
button {
    cursor: pointer;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    transition: background 0.15s;
}

.btn-primary {
    background: #333;
    color: #fff;
}

.btn-primary:hover {
    background: #555;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-delete {
    background: #fff;
    color: #d32f2f;
    border: 1px solid #d32f2f;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

.btn-delete:hover {
    background: #d32f2f;
    color: #fff;
}

/* Main App */
#main-app {
    max-width: 800px;
    margin: 0 auto;
}

.view {
    padding: 1rem;
}

/* Entry Card */
.entry-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 1rem;
    padding: 1rem;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.entry-date {
    font-weight: 600;
    font-size: 1rem;
}

.entry-date.today {
    color: #1976d2;
}

.entry-meta {
    font-size: 0.85rem;
    color: #666;
}

.entry-body {
    border-top: 1px solid #f0f0f0;
    padding-top: 0.75rem;
}

.entry-field {
    margin-bottom: 1rem;
}

.entry-field label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.entry-field input,
.entry-field textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
}

.entry-field input:focus,
.entry-field textarea:focus {
    outline: none;
    border-color: #333;
}

.entry-field textarea {
    min-height: 80px;
    resize: vertical;
}

.decision-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.decision-btn {
    flex: 1;
    padding: 0.5rem;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
}

.decision-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

.entry-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

/* Calendar View */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
}

.calendar-day-header {
    background: #f5f5f5;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
}

.calendar-day {
    background: #fff;
    padding: 0.75rem;
    min-height: 60px;
    cursor: pointer;
    position: relative;
}

.calendar-day:hover {
    background: #f5f5f5;
}

.calendar-day.other-month {
    background: #fafafa;
    color: #999;
}

.calendar-day.has-entry::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #333;
    border-radius: 50%;
}

.calendar-day.today {
    border: 2px solid #1976d2;
}

.calendar-day-number {
    font-size: 0.9rem;
}
