:root {
    --primary: #0050c8;
    --primary-light: #f0f5ff;
    --bg-light: #ffffff;
    --bg-secondary: #f8f9fc;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --text-tertiary: #999;
    --border: #e5e5e5;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.12);
}

body.dark-mode {
    --bg-light: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #ccc;
    --text-tertiary: #888;
    --border: #333;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

.navbar {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease;
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.theme-toggle {
    background: var(--primary-light);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
    color: var(--primary);
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero {
    padding: 60px 0;
    text-align: center;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Gallery Section */
.gallery-section {
    margin-bottom: 60px;
}

.gallery-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-item {
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.gallery-info {
    padding: 20px;
}

.gallery-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.gallery-date {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Form Section */
.form-section {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 60px;
    box-shadow: var(--shadow);
}

.form-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.date-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.date-form .form-group:nth-last-child(2),
.date-form .form-group:nth-last-child(1) {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-light);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    grid-column: 1 / -1;
    background: var(--primary);
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.btn-submit:hover {
    background: #0040a0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 80, 200, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.stat-card {
    background: var(--bg-light);
    padding: 28px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.stat-card h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.stat-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Records Section */
.records-section {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 60px;
    box-shadow: var(--shadow);
}

.records-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.no-records {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
    font-size: 15px;
}

.record-item {
    background: var(--bg-secondary);
    border-left: 3px solid var(--primary);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.record-item:hover {
    background: var(--bg-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.record-info {
    flex: 1;
}

.record-date {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.record-location {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
}

.record-description {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.record-actions {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.record-mood {
    font-size: 1.3em;
}

.record-delete {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.record-delete:hover {
    background: #ff5252;
    transform: scale(1.05);
}

.footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
    font-size: 13px;
    margin-bottom: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 40px 0;
    }

    .subtitle {
        font-size: 16px;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .date-form {
        grid-template-columns: 1fr;
    }

    .date-form .form-group:nth-last-child(2),
    .date-form .form-group:nth-last-child(1) {
        grid-column: auto;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }

    .form-section,
    .records-section {
        padding: 24px;
        border-radius: 12px;
    }

    .form-section h2,
    .records-section h2 {
        font-size: 18px;
        margin-bottom: 24px;
    }

    .record-item {
        flex-direction: column;
    }

    .record-actions {
        margin-top: 12px;
        width: 100%;
        justify-content: space-between;
    }
}
