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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background-color: #f5f5f5;
}

/* Navigation */
.top-nav {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #000;
}

/* Home page */
.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    gap: 2rem;
    text-align: center;
}

.home-container h1 {
    font-size: 3rem;
}

.home-container p {
    font-size: 1.2rem;
    color: #666;
}

/* Login page */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    gap: 2rem;
}

.login-container form {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-save {
    background-color: #28a745;
    color: white;
}

.btn-save:hover {
    background-color: #218838;
}

/* Realtime editor */
.realtime-editor {
    display: flex;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 250px;
    background-color: #fff;
    border-right: 1px solid #ddd;
    padding: 1rem;
    overflow-y: auto;
}

.sidebar h3 {
    margin-bottom: 1rem;
}

.recent-list {
    list-style: none;
}

.recent-list li {
    margin-bottom: 0.5rem;
}

.recent-list a {
    text-decoration: none;
    color: #007bff;
}

.recent-list a:hover {
    text-decoration: underline;
}

.editor-main {
    flex: 1;
    padding: 1rem;
}

.editor-controls {
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

#stxt-title {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.editor-panes {
    display: flex;
    gap: 1rem;
    height: calc(100vh - 200px);
}

.pane {
    flex: 1;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: auto;
}

#stxt-text {
    width: 100%;
    height: 100%;
    padding: 1rem;
    border: none;
    font-family: 'Courier New', monospace;
    resize: none;
    font-size: 0.9rem;
    line-height: 1.6;
}

#preview {
    padding: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Error message */
.error-message {
    color: #d32f2f;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #ffebee;
    border-radius: 4px;
}
