/* ============================================
   MY 54 STORIES — CSS
   User Generated Content Styling
   ============================================ */

:root {
    --story-brand: #c9a227;
    --story-brand-dark: #b8942a;
    --story-brand-glow: rgba(201, 162, 39, 0.15);
    --story-bg: #0d0d1a;
    --story-surface: #1a1a2e;
    --story-surface-light: #222240;
    --story-border: rgba(255, 255, 255, 0.08);
    --story-text: #e0e0e0;
    --story-text-muted: #888;
    --story-success: #28a745;
    --story-warning: #f0ad4e;
    --story-danger: #dc3545;
    --story-radius: 12px;
}

/* ============================================
   Feed Header
   ============================================ */

.my54-stories-feed {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.stories-feed-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--story-surface) 0%, rgba(201, 162, 39, 0.05) 100%);
    border-radius: var(--story-radius);
    border: 1px solid var(--story-border);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.stories-feed-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--story-brand), transparent);
}

.feed-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--story-brand);
    margin: 0 0 8px;
    letter-spacing: 2px;
}

.feed-subtitle {
    color: var(--story-text-muted);
    font-size: 1rem;
    margin: 0 0 24px;
    font-style: italic;
}

.feed-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 24px;
}

.feed-stat {
    text-align: center;
}

.feed-stat .stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.feed-stat .stat-label {
    font-size: 0.75rem;
    color: var(--story-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-share-story {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--story-brand), var(--story-brand-dark));
    color: #1a1a2e;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
}

.btn-share-story:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 162, 39, 0.3);
    color: #1a1a2e;
}

/* ============================================
   Filters
   ============================================ */

.stories-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.story-filter {
    background: var(--story-surface);
    border: 1px solid var(--story-border);
    color: var(--story-text);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s;
    min-width: 160px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.story-filter:focus {
    border-color: var(--story-brand);
    outline: none;
}

.story-filter option {
    background: var(--story-surface);
    color: var(--story-text);
}

.filter-search {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.story-search-input {
    width: 100%;
    background: var(--story-surface);
    border: 1px solid var(--story-border);
    color: var(--story-text);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.story-search-input:focus {
    border-color: var(--story-brand);
    outline: none;
}

.story-search-input::placeholder {
    color: var(--story-text-muted);
}

/* ============================================
   Stories Grid
   ============================================ */

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.no-stories {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--story-text-muted);
}

.no-stories p {
    font-size: 1.1rem;
    margin: 0 0 16px;
}

/* ============================================
   Story Card
   ============================================ */

.story-card {
    background: var(--story-surface);
    border-radius: var(--story-radius);
    border: 1px solid var(--story-border);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.story-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 162, 39, 0.2);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.story-card.story-featured {
    border-color: rgba(201, 162, 39, 0.3);
    box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.1);
}

.story-featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--story-brand), #d4af37);
    color: #1a1a2e;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    letter-spacing: 0.5px;
}

.story-card-image {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
}

.story-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.story-card:hover .story-card-image img {
    transform: scale(1.05);
}

.story-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.story-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.story-category-badge {
    background: var(--story-brand-glow);
    color: var(--story-brand);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.story-category-badge:hover {
    background: rgba(201, 162, 39, 0.25);
    color: var(--story-brand);
}

.story-mood {
    font-size: 0.78rem;
    color: var(--story-text-muted);
}

.story-card-title {
    margin: 0 0 10px;
    font-size: 1.15rem;
    line-height: 1.35;
}

.story-card-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.story-card-title a:hover {
    color: var(--story-brand);
}

.story-card-excerpt {
    color: var(--story-text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0 0 auto;
    padding-bottom: 16px;
}

.story-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--story-border);
    gap: 8px;
}

.story-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.story-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.story-avatar.anonymous-avatar {
    background: var(--story-surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--story-text-muted);
}

.story-author-name {
    font-size: 0.82rem;
    color: var(--story-text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-location {
    font-size: 0.72rem;
    color: var(--story-text-muted);
    white-space: nowrap;
}

.story-location::before {
    content: '📍';
    margin-right: 2px;
}

.story-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.story-like-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--story-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.82rem;
}

.story-like-btn:hover {
    color: #ff6b6b;
}

.story-like-btn.liked {
    color: #ff6b6b;
}

.story-like-btn .like-count {
    font-weight: 600;
}

.story-date {
    font-size: 0.72rem;
    color: var(--story-text-muted);
    white-space: nowrap;
}

/* ============================================
   Submit Form
   ============================================ */

.my54-submit-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 0;
}

.submit-form-header {
    text-align: center;
    margin-bottom: 32px;
}

.submit-form-header h3 {
    font-size: 1.6rem;
    color: var(--story-brand);
    margin: 0 0 8px;
}

.submit-form-header p {
    color: var(--story-text-muted);
    margin: 0;
    font-size: 0.95rem;
}

.my54-story-form {
    background: var(--story-surface);
    border: 1px solid var(--story-border);
    border-radius: var(--story-radius);
    padding: 32px;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    color: var(--story-text);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.form-group label .required {
    color: var(--story-danger);
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--story-bg);
    border: 1px solid var(--story-border);
    color: var(--story-text);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--story-brand);
    box-shadow: 0 0 0 3px var(--story-brand-glow);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 200px;
    line-height: 1.7;
}

.form-group textarea::placeholder,
.form-group input::placeholder {
    color: var(--story-text-muted);
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-group select option {
    background: var(--story-surface);
    color: var(--story-text);
}

.char-count {
    position: absolute;
    right: 12px;
    top: 50%;
    font-size: 0.72rem;
    color: var(--story-text-muted);
}

.word-count-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 0 4px;
}

.word-count-text {
    font-size: 0.82rem;
    color: var(--story-text-muted);
    transition: color 0.2s;
}

.word-count-text.valid {
    color: var(--story-success);
}

.word-count-text.over {
    color: var(--story-danger);
}

.word-count-range {
    font-size: 0.72rem;
    color: var(--story-text-muted);
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-group.half {
    flex: 1;
}

/* Image Upload */
.image-upload-zone {
    border: 2px dashed var(--story-border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s;
}

.image-upload-zone:hover {
    border-color: var(--story-brand);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--story-text-muted);
}

.upload-placeholder svg {
    margin-bottom: 10px;
    opacity: 0.5;
}

.upload-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

.upload-preview {
    position: relative;
    padding-top: 40%;
}

.upload-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-preview .remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.upload-preview .remove-image:hover {
    background: var(--story-danger);
}

/* Checkbox */
.checkbox-group {
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 400 !important;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--story-brand);
    cursor: pointer;
}

.checkbox-label span {
    color: var(--story-text-muted);
    font-size: 0.9rem;
}

/* Submit Actions */
.form-actions {
    text-align: center;
    padding-top: 8px;
}

.btn-submit-story {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--story-brand), var(--story-brand-dark));
    color: #1a1a2e;
    padding: 14px 36px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-submit-story:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 162, 39, 0.3);
}

.btn-submit-story:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-submit-story.submitting {
    position: relative;
    color: transparent;
}

.btn-submit-story.submitting::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: #1a1a2e;
    border-radius: 50%;
    animation: spin54 0.8s linear infinite;
}

@keyframes spin54 {
    to { transform: rotate(360deg); }
}

.submit-note {
    color: var(--story-text-muted);
    font-size: 0.8rem;
    margin: 12px 0 0;
}

/* Success Message */
.submit-success-message {
    text-align: center;
    padding: 40px 20px;
    animation: fadeInUp54 0.5s ease;
}

.submit-success-message .success-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.submit-success-message h3 {
    color: var(--story-brand);
    margin: 0 0 8px;
}

.submit-success-message p {
    color: var(--story-text-muted);
    margin: 0;
}

@keyframes fadeInUp54 {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Login Prompt */
.my54-login-prompt {
    text-align: center;
    padding: 40px;
    background: var(--story-surface);
    border-radius: var(--story-radius);
    border: 1px solid var(--story-border);
}

.my54-login-prompt p {
    color: var(--story-text-muted);
    margin: 0 0 16px;
}

.btn-login {
    display: inline-block;
    background: linear-gradient(135deg, var(--story-brand), var(--story-brand-dark));
    color: #1a1a2e;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    color: #1a1a2e;
}

/* ============================================
   My Stories (Profile Section)
   ============================================ */

.my54-my-stories {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.my-stories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.my-stories-header h3 {
    font-size: 1.4rem;
    color: #fff;
    margin: 0;
}

.btn-new-story {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--story-brand), var(--story-brand-dark));
    color: #1a1a2e;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-new-story:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.3);
    color: #1a1a2e;
}

/* Status Tabs */
.my-stories-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--story-border);
}

.my-stories-tab {
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--story-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.my-stories-tab:hover {
    color: var(--story-text);
}

.my-stories-tab.active {
    color: var(--story-brand);
    border-bottom-color: var(--story-brand);
}

.tab-count {
    background: var(--story-surface-light);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
}

.my-stories-tab.active .tab-count {
    background: var(--story-brand-glow);
    color: var(--story-brand);
}

/* Stories List Items */
.my-stories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-story-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--story-surface);
    border: 1px solid var(--story-border);
    border-radius: 10px;
    transition: all 0.2s;
    gap: 16px;
}

.my-story-item:hover {
    border-color: rgba(201, 162, 39, 0.15);
}

.my-story-item[data-status="rejected"] {
    border-left: 3px solid var(--story-danger);
}

.my-story-item[data-status="featured"] {
    border-left: 3px solid var(--story-brand);
}

.my-story-item[data-status="pending"] {
    border-left: 3px solid var(--story-warning);
}

.my-story-item[data-status="publish"] {
    border-left: 3px solid var(--story-success);
}

.my-story-info {
    flex: 1;
    min-width: 0;
}

.my-story-title {
    margin: 0 0 6px;
    font-size: 1rem;
}

.my-story-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.my-story-title a:hover {
    color: var(--story-brand);
}

.my-story-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.my-story-status {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
}

.my-story-status.status-publish {
    background: rgba(40, 167, 69, 0.15);
    color: #5cb85c;
}

.my-story-status.status-pending {
    background: rgba(240, 173, 78, 0.15);
    color: #f0ad4e;
}

.my-story-status.status-rejected {
    background: rgba(220, 53, 69, 0.15);
    color: #e74c3c;
}

.my-story-status.status-draft {
    background: rgba(150, 150, 150, 0.15);
    color: #999;
}

.my-story-status.status-featured {
    background: var(--story-brand-glow);
    color: var(--story-brand);
}

.my-story-date {
    font-size: 0.75rem;
    color: var(--story-text-muted);
}

.my-story-stats {
    font-size: 0.75rem;
    color: var(--story-text-muted);
}

.rejection-notice {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(220, 53, 69, 0.08);
    border-radius: 6px;
    font-size: 0.82rem;
    color: #e74c3c;
    border: 1px solid rgba(220, 53, 69, 0.15);
}

.rejection-notice strong {
    color: inherit;
}

.my-story-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-edit-story,
.btn-view-story,
.btn-delete-story {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-edit-story {
    background: var(--story-brand-glow);
    color: var(--story-brand);
}

.btn-edit-story:hover {
    background: rgba(201, 162, 39, 0.25);
}

.btn-view-story {
    background: rgba(40, 167, 69, 0.12);
    color: #5cb85c;
}

.btn-view-story:hover {
    background: rgba(40, 167, 69, 0.2);
}

.btn-delete-story {
    background: rgba(220, 53, 69, 0.1);
    color: #e74c3c;
}

.btn-delete-story:hover {
    background: rgba(220, 53, 69, 0.2);
}

.no-stories-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--story-text-muted);
}

.no-stories-message p {
    margin: 0 0 16px;
}

/* ============================================
   Load More
   ============================================ */

.stories-load-more {
    text-align: center;
    padding: 20px 0;
}

.btn-load-more {
    background: var(--story-surface);
    border: 1px solid var(--story-border);
    color: var(--story-text);
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-load-more:hover {
    border-color: var(--story-brand);
    color: var(--story-brand);
}

.btn-load-more:disabled {
    opacity: 0.5;
    cursor: default;
}

.btn-load-more.loading {
    position: relative;
    color: transparent;
}

.btn-load-more.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid var(--story-border);
    border-top-color: var(--story-brand);
    border-radius: 50%;
    animation: spin54 0.6s linear infinite;
}

/* ============================================
   Single Story Page
   ============================================ */

.single-story-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.single-story-header {
    margin-bottom: 32px;
}

.single-story-category {
    display: inline-block;
    background: var(--story-brand-glow);
    color: var(--story-brand);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-decoration: none;
}

.single-story-title {
    font-size: 2rem;
    line-height: 1.3;
    color: #fff;
    margin: 0 0 16px;
}

.single-story-author-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--story-border);
}

.single-story-author-bar .story-avatar {
    width: 40px;
    height: 40px;
}

.author-details {
    flex: 1;
}

.author-details .author-name {
    display: block;
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.author-details .author-meta {
    font-size: 0.8rem;
    color: var(--story-text-muted);
}

.single-story-featured-image {
    margin: 24px 0;
    border-radius: var(--story-radius);
    overflow: hidden;
}

.single-story-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.single-story-content {
    color: var(--story-text);
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 32px;
}

.single-story-content p {
    margin: 0 0 1.2em;
}

.single-story-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid var(--story-border);
    gap: 16px;
    flex-wrap: wrap;
}

.single-story-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.single-story-tags a {
    background: var(--story-surface-light);
    color: var(--story-text-muted);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    text-decoration: none;
    transition: all 0.2s;
}

.single-story-tags a:hover {
    color: var(--story-brand);
    background: var(--story-brand-glow);
}

.single-story-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.single-story-actions .story-like-btn {
    font-size: 0.95rem;
    padding: 8px 16px;
    background: var(--story-surface);
    border-radius: 8px;
    border: 1px solid var(--story-border);
}

.single-story-actions .story-like-btn:hover {
    border-color: rgba(255, 107, 107, 0.3);
}

/* Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-btn {
    width: 62px;
    height: 62px;
    border-radius: 8px;
    background: var(--story-surface);
    border: 1px solid var(--story-border);
    color: var(--story-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}

.share-btn:hover {
    border-color: var(--story-brand);
    color: var(--story-brand);
}

/* Report Button */
.btn-report-story {
    background: none;
    border: none;
    color: var(--story-text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.btn-report-story:hover {
    color: var(--story-danger);
}

/* ============================================
   Toast Notifications
   ============================================ */

.my54-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 24px;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 10000;
    animation: toastSlideIn 0.4s ease, toastSlideOut 0.4s ease 3.6s forwards;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    max-width: 360px;
}

.my54-toast.success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.my54-toast.error {
    background: linear-gradient(135deg, #dc3545, #bd2130);
}

.my54-toast.info {
    background: linear-gradient(135deg, #17a2b8, #117a8b);
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .my54-stories-feed {
        padding: 20px 15px;
    }
    
    .stories-feed-header {
        padding: 30px 16px;
    }
    
    .feed-title {
        font-size: 1.8rem;
    }
    
    .feed-stats {
        gap: 24px;
    }
    
    .feed-stat .stat-number {
        font-size: 1.4rem;
    }
    
    .stories-filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .story-filter {
        flex: 1;
        min-width: 0;
    }
    
    .filter-search {
        max-width: none;
        width: 100%;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .my54-story-form {
        padding: 20px 16px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .my-story-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .my-story-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .my-stories-tabs {
        gap: 2px;
    }
    
    .my-stories-tab {
        padding: 8px 10px;
        font-size: 0.78rem;
    }
    
    .single-story-title {
        font-size: 1.5rem;
    }
    
    .single-story-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .my54-toast {
        left: 15px;
        right: 15px;
        bottom: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stories-feed-header {
        padding: 24px 12px;
    }
    
    .feed-title {
        font-size: 1.4rem;
    }
    
    .feed-stats {
        gap: 16px;
    }
    
    .feed-stat .stat-number {
        font-size: 1.2rem;
    }
    
    .btn-share-story {
        width: 100%;
        justify-content: center;
    }
    
    .story-card-body {
        padding: 16px;
    }
    
    .my-stories-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* ============================================
   Category Archive Page
   ============================================ */

.story-category-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* — Hero Header — */
.category-hero {
    position: relative;
    text-align: center;
    padding: 50px 30px 40px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--story-surface) 0%, rgba(201, 162, 39, 0.08) 100%);
    border-radius: var(--story-radius);
    border: 1px solid var(--story-border);
    overflow: hidden;
}

.category-hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(201, 162, 39, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.category-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--story-brand), transparent);
}

.category-hero-content {
    position: relative;
    z-index: 1;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 20px rgba(201, 162, 39, 0.3));
}

.category-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.category-description {
    font-size: 1rem;
    color: var(--story-text-muted);
    max-width: 600px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.category-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.category-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-stat .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--story-brand);
}

.category-stat .stat-label {
    font-size: 0.75rem;
    color: var(--story-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
}

/* — Breadcrumb — */
.category-breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-top: 8px;
}

.category-breadcrumb a {
    color: var(--story-brand);
    text-decoration: none;
    transition: opacity 0.2s;
}

.category-breadcrumb a:hover {
    opacity: 0.8;
}

.breadcrumb-sep {
    color: var(--story-text-muted);
}

.category-breadcrumb > span:last-child {
    color: var(--story-text-muted);
}

/* — Layout (Main + Sidebar) — */
.category-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* — Featured Story — */
.category-featured-story {
    background: var(--story-surface);
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: var(--story-radius);
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
}

.featured-label {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(201, 162, 39, 0.2);
    color: var(--story-brand);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(8px);
}

.featured-story-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 280px;
}

.featured-story-image {
    position: relative;
    overflow: hidden;
}

.featured-story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.category-featured-story:hover .featured-story-image img {
    transform: scale(1.03);
}

.featured-story-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-story-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.3;
}

.featured-story-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.featured-story-title a:hover {
    color: var(--story-brand);
}

.featured-story-excerpt {
    color: var(--story-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    font-size: 0.8rem;
    color: var(--story-text-muted);
    margin-bottom: 16px;
}

.featured-story-meta .meta-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.featured-story-meta .meta-author img {
    border-radius: 50%;
    width: 24px;
    height: 24px;
}

.featured-read-btn {
    display: inline-flex;
    align-items: center;
    color: var(--story-brand);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.2s;
    gap: 4px;
}

.featured-read-btn:hover {
    gap: 8px;
}

/* — Sort Bar — */
.category-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--story-border);
}

.results-count {
    font-size: 0.9rem;
    color: var(--story-text-muted);
}

.results-count strong {
    color: var(--story-brand);
}

/* — Empty State — */
.category-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--story-surface);
    border-radius: var(--story-radius);
    border: 1px dashed var(--story-border);
}

.category-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.category-empty h3 {
    color: #fff;
    font-size: 1.2rem;
    margin: 0 0 8px;
}

.category-empty p {
    color: var(--story-text-muted);
    margin: 0 0 20px;
}

/* — Pagination — */
.category-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--story-border);
}

.category-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--story-surface);
    border: 1px solid var(--story-border);
    color: var(--story-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.category-pagination .page-numbers:hover {
    border-color: var(--story-brand);
    color: var(--story-brand);
}

.category-pagination .page-numbers.current {
    background: var(--story-brand);
    border-color: var(--story-brand);
    color: #0d0d1a;
    font-weight: 700;
}

.category-pagination .page-numbers.dots {
    border: none;
    background: none;
    color: var(--story-text-muted);
}

.category-pagination .page-numbers.prev,
.category-pagination .page-numbers.next {
    font-weight: 600;
    gap: 4px;
}

/* — Sidebar — */
.category-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--story-surface);
    border: 1px solid var(--story-border);
    border-radius: var(--story-radius);
    padding: 20px;
}

.widget-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--story-brand);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--story-border);
}

/* — Categories Navigation Widget — */
.category-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.category-nav-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--story-text);
    font-size: 0.88rem;
    transition: all 0.2s;
}

.category-nav-list li a:hover {
    background: var(--story-surface-light);
    color: var(--story-brand);
}

.category-nav-list li.active a {
    background: rgba(201, 162, 39, 0.1);
    color: var(--story-brand);
    font-weight: 600;
}

.cat-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.cat-name {
    flex: 1;
}

.cat-count {
    font-size: 0.75rem;
    background: var(--story-surface-light);
    color: var(--story-text-muted);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

.category-nav-list li.active .cat-count {
    background: rgba(201, 162, 39, 0.2);
    color: var(--story-brand);
}

/* — Contributors Widget — */
.contributors-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contributors-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contributor-avatar img {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.contributor-info {
    display: flex;
    flex-direction: column;
}

.contributor-name {
    font-size: 0.88rem;
    color: var(--story-text);
    font-weight: 500;
}

.contributor-count {
    font-size: 0.75rem;
    color: var(--story-text-muted);
}

/* — CTA Widget — */
.cta-widget {
    text-align: center;
    background: linear-gradient(135deg, var(--story-surface) 0%, rgba(201, 162, 39, 0.08) 100%);
    border-color: rgba(201, 162, 39, 0.15);
}

.cta-widget .cta-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.cta-widget h4 {
    font-size: 1rem;
    color: #fff;
    margin: 0 0 6px;
}

.cta-widget p {
    font-size: 0.85rem;
    color: var(--story-text-muted);
    margin: 0 0 16px;
    line-height: 1.5;
}

.cta-widget .cta-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.88rem;
    padding: 10px 16px;
}

/* — Back Widget — */
.back-widget {
    background: transparent;
    border: none;
    padding: 0;
}

.back-to-all {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--story-text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.back-to-all:hover {
    color: var(--story-brand);
}

/* — Category Archive Responsive — */
@media (max-width: 1024px) {
    .category-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .category-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .category-sidebar .back-widget {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .category-hero {
        padding: 35px 20px 30px;
    }
    
    .category-icon {
        font-size: 2.2rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .category-stats {
        gap: 24px;
    }
    
    .category-stat .stat-number {
        font-size: 1.2rem;
    }
    
    .featured-story-inner {
        grid-template-columns: 1fr;
    }
    
    .featured-story-image {
        height: 200px;
    }
    
    .featured-story-content {
        padding: 20px;
    }
    
    .category-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .story-category-archive {
        padding: 0 12px 40px;
    }
    
    .category-hero {
        padding: 28px 16px 24px;
        border-radius: 8px;
        margin-bottom: 24px;
    }
    
    .category-title {
        font-size: 1.3rem;
    }
    
    .category-description {
        font-size: 0.9rem;
    }
    
    .category-stats {
        gap: 16px;
    }
    
    .featured-story-title {
        font-size: 1.1rem;
    }
    
    .category-sort-bar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}
