/* Set core variables for easy changes later */
:root {
    --background-color: #fdfdfd; /* A very soft, almost-white */
    --text-color: #1a1a1a;       /* A soft, almost-black */
    --font-family: 'Georgia', 'serif'; /* A classic, readable font */
}

/* Reset default browser styles for a clean slate */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background-color);
    font-family: var(--font-family);
    color: var(--text-color);
}

/* Header styling */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(253, 253, 253, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: normal;
    color: var(--text-color);
}

.login-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 16px;
    border: 1px solid #667eea;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.login-link:hover {
    background-color: #667eea;
    color: white;
}

/* The main editor textarea */
#editor {
    width: 100%;
    height: calc(100vh - 80px); /* Account for header height */
    padding: 5vw;   /* Use vw (viewport width) for responsive padding */
    margin-top: 80px; /* Add margin to account for fixed header */
    
    /* Remove all default styling to make it invisible */
    border: none;
    outline: none;
    resize: none;
    background-color: transparent;

    /* Font styling */
    font-family: inherit; /* Use the body's font */
    font-size: 1.2rem;    /* A comfortable reading size */
    line-height: 1.7;     /* Generous spacing between lines */
    color: inherit;       /* Use the body's text color */
}

/* Style the placeholder text */
#editor::placeholder {
    color: #cccccc;
}

#commit-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    
    /* New subtle styling */
    background-color: rgba(26, 26, 26, 0.7); /* Semi-transparent background */
    color: rgba(253, 253, 253, 0.8);      /* Slightly transparent text */
    backdrop-filter: blur(5px);              /* A nice glass-like effect for modern browsers */
    -webkit-backdrop-filter: blur(5px);      /* For Safari compatibility */

    font-family: 'Menlo', 'monospace';
    font-size: 0.9rem; /* Slightly smaller font */
    border: 1px solid rgba(255, 255, 255, 0.1); /* A very subtle border */
    padding: 8px 16px;
    border-radius: 7px;
    cursor: pointer;
    
    /* A smoother transition */
    transition: background-color 0.2s ease, color 0.2s ease;
}

#commit-button:hover {
    /* On hover, become more solid and opaque */
    background-color: rgba(26, 26, 26, 0.9);
    color: rgba(253, 253, 253, 1);
}
/* --- History View Styles --- */

#history-container {
    width: 100%;
    max-width: 800px; /* Set a max-width for readability on large screens */
    margin: 40px auto; /* Center the container */
    padding: 0 20px;   /* Add some side padding */
}

.entry {
    background-color: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05);
}

.entry-text {
    font-size: 1.1rem;
    line-height: 1.6;
    white-space: pre-wrap; /* This respects line breaks and spacing */
    word-wrap: break-word; /* Prevents long words from overflowing */
}

.entry-meta {
    margin-top: 15px;
    font-family: 'Menlo', 'monospace';
    font-size: 0.8rem;
    color: #888888;
    text-align: right;
}