/* Modern CSS Reset */
:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --secondary: #3f37c9;
    --accent: #4cc9f0;
    --text: #2b2d42;
    --text-light: #8d99ae;
    --background: #f8f9fa;
    --white: #ffffff;
    --error: #ef476f;
    --success: #06d6a0;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    padding: 24px;
    min-height: 100vh;
}

/* Container styles */
#login-screen,
#app-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Login screen */
#login-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10vh;
    padding: 40px 30px;
}

#login-screen h1 {
    margin-bottom: 24px;
    color: var(--primary);
    font-weight: 600;
}

#login-screen input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

#login-screen input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

#login-screen button {
    width: 100%;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

#login-screen button:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Navigation */
nav {
    margin-bottom: 20px;
}

nav ul {
    list-style: none;
    display: flex;
    background: var(--primary);
    padding: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

nav ul li {
    flex: 1;
}

nav ul li a {
    display: block;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 16px 0;
    text-align: center;
    transition: var(--transition);
}

nav ul li a:hover,
nav ul li a.active {
    background: var(--secondary);
}

/* Views */
.view {
    padding: 24px;
}

.view h2 {
    margin-bottom: 20px;
    color: var(--primary);
    font-weight: 600;
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

button {
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

button:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

button.secondary {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
}

button.secondary:hover {
    background: rgba(67, 97, 238, 0.1);
}

/* History entries */
.history-entry {
    background: var(--white);
    padding: 20px;
    margin-bottom: 16px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.history-entry:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.history-entry h3 {
    margin-bottom: 8px;
    color: var(--primary);
}

.history-entry p {
    color: var(--text);
    margin-bottom: 12px;
}

.history-entry .date {
    color: var(--text-light);
    font-size: 14px;
    text-align: right;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    body {
        padding: 16px;
    }

    .view {
        padding: 20px;
    }

    nav ul li a {
        padding: 12px 0;
        font-size: 14px;
    }
}

/* Add subtle animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view,
#login-screen {
    animation: fadeIn 0.3s ease;
}