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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #e4e6eb;
    background: #18191a;
    min-height: 100vh;
}

/* Link colors - muted but visible */
a {
    color: #8ab4f8;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #aaccff;
    text-decoration: underline;
}

a:visited {
    color: #9d8df7;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    background: #242526;
    border-bottom: 1px solid #3a3b3c;
    margin-bottom: 20px;
    padding: 20px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5em;
    color: #5b7ec4;
    font-weight: 600;
}

nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

nav a {
    color: #b0b3b8;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

nav a:hover {
    background: #3a3b3c;
    color: #e4e6eb;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #3a3b3c;
    flex-wrap: wrap;
}

.social-links a {
    color: #7a9bd4;
    text-decoration: none;
    font-size: 14px;
    padding: 4px 12px;
    background: #2a2b2c;
    border-radius: 6px;
    transition: all 0.2s;
}

.social-links a:hover {
    background: #3a3b3c;
    color: #9ab8e8;
}

/* Delete Button */
.btn-delete {
    background: transparent;
    border: none;
    color: #8a8d91;
    cursor: pointer;
    font-size: 18px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
}

.btn-delete:hover {
    background: #3a3b3c;
    color: #e4405f;
    transform: scale(1.1);
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
}

.flash {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 14px;
}

.flash.success {
    background: #1f3a2e;
    color: #6dda94;
    border: 1px solid #2d5940;
}

.flash.error {
    background: #3a2121;
    color: #f5796f;
    border: 1px solid #5a2f2f;
}

/* Post Form Styles */
.post-form {
    background: #242526;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    border: 1px solid #3a3b3c;
}

.post-form h2 {
    margin-bottom: 16px;
    color: #e4e6eb;
    font-size: 1.2em;
    font-weight: 600;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #b0b3b8;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group textarea,
.form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #3a3b3c;
    border-radius: 8px;
    font-size: 15px;
    background: #3a3b3c;
    color: #e4e6eb;
    transition: all 0.2s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #5b7ec4;
    background: #404142;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #8a8d91;
    font-size: 12px;
}

.checkbox-group {
    margin-top: 16px;
}

.checkbox-group label {
    display: inline-flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    color: #b0b3b8;
    font-size: 14px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #5b7ec4;
    color: #fff;
}

.btn-primary:hover {
    background: #4a6aa8;
}

.btn-danger {
    background: #e4405f;
    color: #fff;
}

.btn-danger:hover {
    background: #c93552;
}

/* Posts/Archive Section */
.posts {
    margin-top: 20px;
}

.posts h2 {
    margin-bottom: 20px;
    color: #e4e6eb;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
}

/* Search Form */
.search-form {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.search-form input[type="text"] {
    padding: 10px 16px;
    border: 1px solid #3a3b3c;
    border-radius: 8px;
    width: 300px;
    background: #242526;
    color: #e4e6eb;
    font-size: 14px;
}

.search-form input[type="text"]:focus {
    outline: none;
    border-color: #5b7ec4;
}

/* Individual Post Entry - Microblog Style */
.post-entry {
    background: #242526;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #3a3b3c;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.post-entry:hover {
    border-color: #4a4b4c;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.post-entry .timestamp {
    color: #8a8d91;
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-entry .timestamp::before {
    content: "🕐";
    font-size: 14px;
}

.post-entry .content {
    color: #e4e6eb;
    line-height: 1.5;
    font-size: 15px;
    margin-bottom: 12px;
    word-wrap: break-word;
}

.post-entry .url {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #3a3b3c;
    color: #5b7ec4;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    margin-top: 8px;
}

.post-entry .url:hover {
    background: #4a4b4c;
    color: #7a9bd4;
}

.post-entry .image-ref {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #2f3a4a;
    color: #7a9bd4;
    border-radius: 8px;
    font-size: 13px;
}

.post-entry-image {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #3a3b3c;
    max-width: 100%;
}

.post-entry-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Link Preview Card */
.link-preview-card {
    display: block;
    margin-top: 12px;
    background: #2a2b2c;
    border: 1px solid #3a3b3c;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.2s;
}

.link-preview-card:hover {
    border-color: #4a4b4c;
    background: #2f3031;
}

.link-preview-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #1a1b1c;
}

.link-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-preview-content {
    padding: 12px;
}

.link-preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #e4e6eb;
    margin-bottom: 6px;
    line-height: 1.4;
}

.link-preview-description {
    font-size: 14px;
    color: #b0b3b8;
    line-height: 1.5;
    margin-bottom: 8px;
}

.link-preview-url {
    font-size: 13px;
    color: #7a9bd4;
}

/* Pagination Styles */
.pagination {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    background: #242526;
    color: #b0b3b8;
    text-decoration: none;
    border: 1px solid #3a3b3c;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 14px;
}

.pagination a:hover {
    background: #3a3b3c;
    color: #e4e6eb;
}

.pagination .current {
    background: #5b7ec4;
    color: #fff;
    border-color: #5b7ec4;
}

/* Queue Styles */
.queue-list {
    list-style: none;
}

.queue-item {
    padding: 16px;
    background: #242526;
    border: 1px solid #3a3b3c;
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.queue-item .content {
    flex: 1;
    color: #e4e6eb;
    font-size: 15px;
}

.queue-item strong {
    color: #5b7ec4;
    margin-right: 8px;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 10px;
    background: #5b7ec4;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

/* Authentication Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-box {
    background: #242526;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid #3a3b3c;
    max-width: 400px;
    width: 100%;
}

.auth-box h1 {
    text-align: center;
    color: #5b7ec4;
    margin-bottom: 8px;
    font-size: 2em;
}

.auth-description {
    text-align: center;
    color: #8a8d91;
    margin-bottom: 24px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
    margin-top: 8px;
}

/* Settings Page */
.credential-help {
    background: #2a2b2c;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #3a3b3c;
}

.credential-help h3 {
    color: #5b7ec4;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.1em;
}

.credential-help ol {
    margin-left: 20px;
    color: #b0b3b8;
    font-size: 14px;
    line-height: 1.8;
}

.credential-help li {
    margin-bottom: 8px;
}

.credential-help ul {
    margin-top: 8px;
    margin-left: 20px;
}

.credential-help code {
    background: #3a3b3c;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #7a9bd4;
}

.credential-help strong {
    color: #e4e6eb;
}

/* Empty State */
.empty-state {
    color: #8a8d91;
    text-align: center;
    padding: 60px 20px;
    font-size: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    header .container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    header h1 {
        font-size: 1.3em;
    }
    
    nav {
        width: 100%;
        justify-content: center;
    }
    
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form input[type="text"] {
        width: 100%;
    }
    
    .queue-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .queue-item .content {
        margin-bottom: 12px;
    }
    
    .post-form {
        padding: 16px;
    }
    
    .rss-feed-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rss-feed-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* RSS Feed Styles */
.rss-feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rss-feed-item {
    background: #2a2b2c;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #3a3b3c;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.rss-feed-info {
    flex: 1;
}

.rss-feed-info h3 {
    color: #e4e6eb;
    font-size: 1.1em;
    margin: 0 0 4px 0;
    font-weight: 600;
}

.rss-feed-url {
    color: #8a8d91;
    font-size: 13px;
    margin: 0;
    word-break: break-all;
}

.rss-feed-actions {
    display: flex;
    gap: 8px;
}

/* RSS Entry Styles */
.rss-entry {
    background: #242526;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid #3a3b3c;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.rss-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.rss-entry-title {
    flex: 1;
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.rss-entry-title a {
    color: #7a9bd4;
    text-decoration: none;
    transition: color 0.2s;
}

.rss-entry-title a:hover {
    color: #9ab8e8;
    text-decoration: underline;
}

.rss-entry-date {
    color: #8a8d91;
    font-size: 12px;
    white-space: nowrap;
}

.rss-entry-summary {
    color: #b0b3b8;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.rss-entry-author {
    color: #8a8d91;
    font-size: 13px;
    font-style: italic;
    margin-bottom: 12px;
}

.rss-entry-form {
    border-top: 1px solid #3a3b3c;
    padding-top: 12px;
    margin-top: 12px;
}
