body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    background-color: #f7f9fa;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 15px;
    min-height: 100vh;
    box-sizing: border-box;
}

header {
    margin-bottom: 40px;
    width: 100%;
    max-width: 700px;
    display: flex;
    justify-content: center;
}

nav {
    display: flex;
    gap: 15px;
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.nav-button {
    padding: 12px 25px;
    border: none;
    background-color: transparent;
    color: #555;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-button:hover {
    background-color: #e9ecef;
    color: #000;
}

.nav-button.active {
    background-color: #4CAF50;
    color: white;
    font-weight: 600;
}

.nav-button.active:hover {
    background-color: #45a049;
}

.nav-button.active-section {
    background-color: #8f918f;
    color: white;
    font-weight: 600;
}

main {
    width: 100%;
    max-width: 700px;
}

.post {
    background-color: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 5px 15px rgba(0,0,0,0.03);
}

.post-url {
    font-size: 15px;
    color: #0366d6;
    margin-bottom: 10px;
    word-break: break-all;
    font-weight: 500;
}

.post-content {
    font-size: 16px;
    color: #3a3a3a;
    margin-bottom: 20px;
    line-height: 1.6;
}

.post-timestamp {
    font-size: 13px;
    color: #777;
    text-align: right;
}

@media (max-width: 600px) {
    nav {
        flex-direction: column;
        align-items: stretch;
    }
    .nav-button {
        text-align: center;
    }
    main {
        width: 95%;
    }
    .post {
        padding: 20px;
    }
}

/* Modal Styling */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Darker semi-transparent backdrop */
    display: flex; /* Use flex to center modal content */
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure modal is on top */
    padding: 20px; /* Add padding for smaller screens so modal isn't edge-to-edge */
    box-sizing: border-box;
}

.modal-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px; /* More pronounced rounding */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); /* Softer, more modern shadow */
    width: 100%;
    max-width: 550px; /* A sensible maximum width */
    display: flex;
    flex-direction: column;
    gap: 20px; /* Spacing between modal elements */
    max-height: 90vh; /* Max height to prevent overflow on small screens */
    overflow-y: auto; /* Allow scrolling within the modal if content exceeds max-height */
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 5px; /* Reduced margin for title */
    font-size: 24px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.modal-content label {
    font-size: 14px;
    font-weight: 500;
    color: #444;
    margin-bottom: -10px; /* Pull label closer to input */
}

.modal-content input[type="text"],
.modal-content textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.modal-content input[type="text"]:focus,
.modal-content textarea:focus {
    border-color: #4CAF50; /* Highlight focus with theme color */
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.modal-content textarea {
    resize: vertical; /* Allow vertical resize only */
    min-height: 100px; /* Minimum height for content area */
}

.modal-tags-section {
    display: flex;
    align-items: center; /* Align add tag button with tags */
    gap: 10px;
    flex-wrap: wrap; /* Allow tags to wrap to next line */
}

.tags-container {
    display: flex;
    flex-wrap: wrap; /* Tags wrap within their container */
    gap: 8px; /* Gap between tags */
    flex-grow: 1; /* Allow tag container to take available space */
}

.tag-button {
    padding: 6px 12px;
    border: none;
    border-radius: 15px; /* Pill-shaped tags */
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.tag-button:hover {
    opacity: 0.85;
}

.add-tag-button {
    padding: 8px 15px;
    border: 1px dashed #aaa; /* Dashed border for "add" */
    background-color: #f0f0f0;
    color: #555;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.add-tag-button:hover {
    background-color: #e0e0e0;
    border-color: #888;
}

.modal-actions {
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    gap: 10px;
    margin-top: 10px; /* Add some space above action buttons */
}

.modal-actions .button-primary,
.modal-actions .button-secondary {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease;
}

.modal-actions .button-primary {
    background-color: #4CAF50; /* Theme green */
    color: white;
}

.modal-actions .button-primary:hover {
    background-color: #45a049;
}

.modal-actions .button-secondary {
    background-color: #f0f0f0; /* Light grey for cancel/secondary */
    color: #333;
    border: 1px solid #ddd;
}

.modal-actions .button-secondary:hover {
    background-color: #e0e0e0;
}

/* Ensure the main content is not interactive when modal is open */
body.modal-open > *:not(.modal-backdrop) {
  pointer-events: none;
  /* filter: blur(3px); optional: blur background */
}

.tag-search-add-container {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.tag-search-input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 8px;
}

.add-tag-from-search-button {
    padding: 8px 12px;
    /* Assuming button-primary styles exist and provide background, color, etc. */
    /* Add any specific overrides if needed */
}

/* Search input styling */
.search-input {
    width: 100%; /* Or a specific max-width e.g., max-width: 400px; */
    padding: 10px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box; /* Ensures padding doesn't add to the width */
    font-size: 1rem;
}

.search-input:focus {
    border-color: #007bff; /* Highlight color on focus */
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25); /* Optional: Bootstrap-like focus shadow */
}

/* Styling for the container of all tags in the tags view */
#all-tags-list-container.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Spacing between tag pills */
    padding: 10px;
    border: 1px solid #f0f0f0; /* Light border for the container itself */
    border-radius: 6px;
} 