/* 
 * Shizuku's Diary - Styles
 * Theme: Soft, Clean, Premium
 */

:root {
    --bg-color: #f8f9fa;
    --paper-color: #ffffff;
    --primary-color: #7b9acc;
    /* Soft Blue */
    --primary-hover: #5d82be;
    --text-main: #4a4a4a;
    --text-light: #888888;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --radius-md: 12px;
    --radius-lg: 20px;
    --font-main: 'Zen Maru Gothic', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout */
.app-container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background-color: transparent;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem;
    background-color: var(--bg-color);
    /* Sticky header blends in */
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    font-family: var(--font-main);
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(123, 154, 204, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(123, 154, 204, 0.4);
}

.btn-text {
    background: transparent;
    color: var(--text-light);
    padding: 0.5rem;
}

.btn-text:hover {
    color: var(--text-main);
    background-color: rgba(0, 0, 0, 0.05);
}

.btn-submit {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
    justify-content: center;
    padding: 0.8rem;
    font-size: 1rem;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
}

/* Main Content Area */
#main-content {
    flex: 1;
    padding: 1rem 1.5rem;
    position: relative;
    overflow-x: hidden;
}

/* Views */
.view {
    /* Simple transition setup */
    opacity: 1;
    transition: opacity 0.3s ease;
}

.view.hidden {
    display: none;
    opacity: 0;
}

/* List View */
.entries-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d0d0d0;
}

/* Entry Card */
.entry-card {
    background-color: var(--paper-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid white;
    cursor: default;
    /* Currently just viewing */
    position: relative;
}

.entry-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.entry-date {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.entry-delete {
    background: none;
    border: none;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.2rem;
    transition: color 0.2s;
}

.entry-delete:hover {
    color: #ff6b6b;
}

.entry-title {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.entry-body {
    font-size: 1rem;
    color: #666;
    white-space: pre-wrap;
    /* Keeps line breaks */
    line-height: 1.8;
}

/* Editor View */
.editor-container {
    background-color: var(--paper-color);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.editor-toolbar h2 {
    font-size: 1.2rem;
    color: var(--text-main);
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-group input,
.form-group textarea {
    font-family: var(--font-main);
    padding: 0.8rem;
    border: 2px solid var(--bg-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background-color: var(--bg-color);
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    background-color: white;
}

.form-group textarea {
    min-height: 200px;
    resize: vertical;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #ccc;
    font-size: 0.8rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(50, 50, 50, 0.9);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
    z-index: 100;
    transition: opacity 0.3s, transform 0.3s;
}

.toast.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

/* Data Management */
.data-management {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

.data-management summary {
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 0.5rem;
    list-style: none;
    /* Hide default triangle in some browsers */
}

.data-management summary::-webkit-details-marker {
    display: none;
}

.data-controls {
    background: rgba(255, 255, 255, 0.5);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
}

.data-desc {
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.data-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}