/* 404 page styles */
body.notfound {
    text-align: center;
    padding: 5rem 1rem;
    background: #fafafa;
    color: #2c3e50;
    transition: background 0.3s, color 0.3s;
}
.notfound-title {
    font-size: 4rem;
    margin-bottom: 1rem;
}
.notfound-msg {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}
.btn {
    background: #e74c3c;
    color: #fff;
    padding: 0.7rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
}
.btn:hover {
    background: #c0392b;
}
.theme-toggle {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #e74c3c 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.8rem 1rem;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
} 
body.dark.notfound {
    background: #181c24;
    color: #f1f1f1;
}
body.dark .btn {
    background: #222e3c;
    color: #fff;
}
body.dark .btn:hover {
    background: #1a2230;
}
body.dark .theme-toggle {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.theme-toggle:active {
    transform: scale(0.95);
}
/* Spinner styles */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 0.5rem;
}

.image-preview-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 0; transition: opacity .18s ease; z-index: 99999; }
.image-preview-modal.visible { pointer-events: auto; opacity: 1; }
.image-preview-modal .ip-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); z-index: 99990; }
.image-preview-modal .ip-dialog { position: relative; z-index: 99999; width: min(820px, 92%); max-height: 80vh; background: var(--card-bg, #fff); color: var(--text, #111); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.35); overflow: hidden; display: flex; flex-direction: column; pointer-events: auto; }
/* DEBUG: make dialog visually obvious */
.image-preview-modal.debug .ip-dialog { background: #fff2cc !important; padding: 28px !important; border: 3px solid #ff9900 !important; box-shadow: 0 12px 40px rgba(0,0,0,0.5) !important; }
.image-preview-modal .ip-header { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid rgba(0,0,0,0.06); }
.image-preview-modal .ip-header h3 { margin:0; font-size:1rem; }
.image-preview-modal .ip-close { background:transparent; border:0; font-size:20px; line-height:1; cursor:pointer; }
.image-preview-modal .ip-controls { display:flex; gap:8px; align-items:center; padding:12px 16px; flex-wrap:wrap; border-bottom:1px solid rgba(0,0,0,0.04); }
.image-preview-modal .ip-controls label { font-size:0.9rem; display:flex; gap:6px; align-items:center; }
.image-preview-modal .ip-controls select, .image-preview-modal .ip-controls input[type="checkbox"] { margin-left:6px; }
.image-preview-modal .ip-preview { padding:16px; overflow:auto; display:flex; align-items:center; justify-content:center; background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.01)); min-height:240px; }
.image-preview-modal .ip-preview img { max-width: 100%; max-height: 60vh; object-fit: contain; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.image-preview-modal .ip-loading, .image-preview-modal .ip-error { color: #666; }

/* small spinner inside modal */
.ip-loading { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; }
.ip-loading .loading-text { color: var(--muted, #6b7280); }

/* samples strip */
.ip-samples { background: transparent; }
.ip-sample { cursor: pointer; width: 150px; flex: 0 0 150px; }
.ip-sample .ip-sample-box { background: #f6f7fb; border-radius: 6px; overflow: hidden; height: 100px; display:flex; align-items:center; justify-content:center; }
.ip-sample img { display:block; width:100%; height:100%; object-fit: cover; }
.ip-sample:focus, .ip-sample:hover { outline: 2px solid rgba(102,126,234,0.14); transform: translateY(-2px); }

/* Dark theme tweaks */
body.dark .image-preview-modal .ip-dialog {
    background: #0f1720;
    color: #e6eef8;
    border: 1px solid rgba(255,255,255,0.04);
}

/* Scroll to top button styles */
#scroll-top-btn {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: background 0.2s;
}
#scroll-top-btn:hover {
    background: #c0392b;
}

/* Footer social icon styles */
.footer-icon img {
    height: 24px;
    width: 24px;
    margin: 0 0.25rem;
    vertical-align: middle;
    transition: filter 0.2s;
}
.footer-icon img:hover {
    filter: brightness(0.7);
}
/* Share button styles */
.share-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.share-btn:hover::before {
    left: 100%;
}

.share-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.share-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* Like button styles */
.like-btn {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid #e74c3c;
    color: #e74c3c;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.like-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(231, 76, 60, 0.1), transparent);
    transition: left 0.5s;
}

.like-btn:hover::before {
    left: 100%;
}

.like-btn:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

.like-btn.liked {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.like-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.1);
}

/* Copy link button styles */
.copy-link-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.copy-link-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.copy-link-btn:hover::before {
    left: 100%;
}

.copy-link-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.copy-link-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

/* Share buttons container */
.share-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.share-buttons .share-btn {
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.share-buttons .share-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.share-buttons .share-btn:active {
    transform: translateY(0);
}

/* Poem actions container */
.poem-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Poem extra info */
.poem-extra {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
    color: #7f8c8d;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.poem-extra span {
    background: #f8f9fa;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* Dark theme adjustments for new elements */
body.dark .like-btn {
    background: #232b39;
    border-color: #e74c3c;
    color: #e74c3c;
}

body.dark .like-btn:hover,
body.dark .like-btn.liked {
    background: #e74c3c;
    color: #fff;
}

body.dark .copy-link-btn {
    background: #2980b9;
    color: #fff;
}

body.dark .copy-link-btn:hover {
    background: #1f5f8b;
}

body.dark .poem-extra {
    border-top-color: #444;
    color: #b2bec3;
}

body.dark .poem-extra span {
    background: #2c3e50;
    color: #fff;
}
  
/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
    transition: background 0.3s, color 0.3s;
}

body.dark {
    background: #181c24 !important;
    color: #f1f1f1 !important;
}

html.dark {
    background: #181c24 !important;
}

html.dark body {
    background: #181c24 !important;
    color: #f1f1f1 !important;
}

body.dark a {
    color: #7ecfff;
}

body.dark .card {
    background: #232b39;
    color: #f1f1f1;
}

body.dark .poem-card {
    background: #232b39;
    color: #f1f1f1;
}

body.dark .poem-card::before {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
}

body.dark .poem-article {
    background: #232b39;
    color: #f1f1f1;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

body.dark .poem-content {
    color: #f1f1f1;
}

body.dark .poem-content::before,
body.dark .poem-content::after {
    color: #e74c3c;
    opacity: 0.5;
}

body.dark .poem-header {
    border-bottom-color: #444;
}

body.dark .poem-header h1 {
    color: #f1f1f1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

body.dark .poem-date {
    color: #b2bec3;
}

body.dark .header {
    background: #232b39;
    color: #f1f1f1;
}

body.dark .nav-text h1 {
    color: #f1f1f1;
}

body.dark .nav-text p {
    color: #b2bec3;
}

body.dark .nav-logo {
    border-color: #e74c3c;
}

body.dark .nav-link {
    color: #f1f1f1;
}

body.dark .nav-link:hover,
body.dark .nav-link.active {
    color: #e74c3c;
}

body.dark .tag {
    background: #2c3e50;
    color: #fff;
}

body.dark input, body.dark textarea, body.dark select {
    background: #232b39;
    color: #f1f1f1;
    border-color: #444;
}

body.dark .btn {
    background: #222e3c;
    color: #fff;
}

body.dark .btn:hover {
    background: #1a2230;
}

body.dark .theme-toggle {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

body.dark .theme-toggle:hover {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

body.dark .section-title {
    color: #f1f1f1;
}

body.dark .poem-title {
    color: #f1f1f1;
}

body.dark .poem-excerpt {
    color: #b2bec3;
}

body.dark .poem-meta {
    color: #b2bec3;
}

body.dark .poem-date {
    color: #b2bec3;
}

body.dark .poem-stats {
    color: #b2bec3;
}

body.dark .poem-likes, 
body.dark .poem-views {
    background: #2c3e50;
    color: #f1f1f1;
}

body.dark .poem-header h1 {
    color: #f1f1f1;
}

body.dark .footer {
    background: #1a1a1a;
    color: #f1f1f1;
}

body.dark .hero {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #f1f1f1;
}

body.dark .loading {
    color: #b2bec3;
}

body.dark .poem-tags {
    color: #b2bec3;
}

/* Ensure all text elements have proper dark theme colors */
body.dark h1, body.dark h2, body.dark h3, body.dark h4, body.dark h5, body.dark h6 {
    color: #f1f1f1;
}

body.dark p {
    color: #e0e0e0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo {
    width: 40px;
    height: 40px;
    border: 2px solid #e74c3c;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.nav-text {
    display: flex;
    flex-direction: column;
}

.nav-text h1 {
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: 700;
    margin: 0;
}

.nav-text p {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-style: italic;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #e74c3c;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e74c3c;
}

/* Auth nav positioning and spacing */
#auth-nav {
    margin-left: auto;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding-left: 12px;
}
#auth-nav .nav-link {
    color: inherit;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-weight: 500;
}
#auth-nav .nav-link:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}
#auth-nav .nav-user {
    font-weight: 600;
    color: #2c3e50;
    transition: color 0.3s ease;
}
#auth-nav .btn-secondary {
    background: linear-gradient(135deg, #636e72 0%, #5a5a5a 100%);
    color: #fff;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#auth-nav .btn-secondary:hover {
    background: linear-gradient(135deg, #4a4a4a 0%, #404040 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
#auth-nav .btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Auth avatar wrapper */
.auth-avatar-wrapper {
    position: relative;
    margin-left: 8px;
    transition: transform 0.2s ease;
}
.auth-avatar-wrapper:hover {
    transform: scale(1.05);
}

/* Dark theme for auth nav */
body.dark #auth-nav .nav-link {
    color: #f1f1f1;
}
body.dark #auth-nav .nav-link:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.2);
}
body.dark #auth-nav .nav-user {
    color: #f1f1f1;
}
body.dark #auth-nav .btn-secondary {
    background: linear-gradient(135deg, #4a4a4a 0%, #404040 100%);
    color: #f1f1f1;
}
body.dark #auth-nav .btn-secondary:hover {
    background: linear-gradient(135deg, #636e72 0%, #5a5a5a 100%);
}

/* Auth avatar + dropdown styles */
.auth-avatar-wrapper { position: relative; display: inline-block; }
.nav-avatar-btn { background: transparent; border: none; cursor: pointer; padding: 0; display: flex; align-items: center; }
.nav-avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg,#667eea,#e74c3c); color:#fff; font-weight:700; box-shadow:0 4px 10px rgba(0,0,0,0.12); }
.user-dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: #fff; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); padding: 0.5rem; z-index: 1200; border: 1px solid rgba(0,0,0,0.06); }
.user-dropdown.hidden { display: none; }
.user-dropdown-info { padding: 0.5rem 0.5rem 0.25rem 0.5rem; border-bottom: 1px solid rgba(0,0,0,0.04); }
.user-name { font-weight: 700; color: #222; font-size: 0.95rem; }
.user-email { font-size: 0.85rem; color: #6b7280; margin-top: 0.15rem; }
.user-dropdown-actions { padding: 0.5rem; display: flex; justify-content: flex-end; }
.user-dropdown .btn { padding: 0.4rem 0.6rem; font-size: 0.9rem; }

/* Dark theme for dropdown */
body.dark .user-dropdown { background: #1f2630; border-color: rgba(255,255,255,0.04); box-shadow: 0 8px 20px rgba(0,0,0,0.6); }
body.dark .user-name { color: #f1f1f1; }
body.dark .user-email { color: #9aa6b2; }

/* Small adjustments to ensure nav spacing when auth nav exists */
#auth-nav { display: flex; align-items: center; gap: 0.5rem; }

@media (max-width: 620px) {
  .nav-avatar { width: 32px; height: 32px; font-size: 0.85rem; }
  .user-dropdown { min-width: 170px; right: -6px; }
}

/* Main content */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

/* Hero section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* Section titles */
.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #2c3e50;
}

/* Poems grid */
.poems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.poem-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.poem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.05) 0%, rgba(102, 126, 234, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.poem-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.poem-card:hover::before {
    opacity: 1;
}

.poem-card:active {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.poem-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.poem-excerpt {
    color: #7f8c8d;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.poem-meta {
    font-size: 0.9rem;
    color: #95a5a6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.poem-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
}

.poem-likes, .poem-views {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: #f8f9fa;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* Inline like button variant used in poem listing */
.inline-like { 
    background: transparent; 
    border: 1px solid rgba(0,0,0,0.06); 
    padding: 0.15rem 0.5rem; 
    border-radius: 10px; 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    gap: 0.4rem; 
    font-size: 0.75rem;
}
.inline-like .like-icon { color: #e74c3c; }
.inline-like.liked { background: linear-gradient(90deg,#ff7b7b,#ff5252); color: #fff; border-color: transparent; }

/* Share menu for single poem */
.share-menu { position: absolute; right: 1.25rem; top: 1.25rem; background: #fff; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); padding: 0.5rem; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.98); pointer-events: none; z-index: 9999; transition: opacity 220ms ease, transform 220ms ease, visibility 220ms; }
.share-menu.visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }
.share-menu.anim-open { transform-origin: top right; }

@keyframes shareOpen {
    0% { transform: translateY(-6px) scale(0.98); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
.share-menu .share-option { display:flex; align-items:center; gap:0.6rem; padding:0.4rem 0.6rem; border-radius:8px; cursor:pointer; }
.share-menu .share-option:hover { background: #f2f6fb; }
.share-menu .share-option .icon { width:26px; height:26px; display:inline-flex; align-items:center; justify-content:center; }
.share-menu .share-option.copy { color: #2c3e50; }
.share-menu .share-option.image { color: #7b61ff; }
.share-menu .share-option.social { color: #1da1f2; }

.poem-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: #ecf0f1;
    color: #7f8c8d;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* Individual poem page */
.poem-article {
    background: white;
    border-radius: 20px;
    padding: 4rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.poem-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #e74c3c 100%);
}

.poem-content {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    line-height: 2.2;
    white-space: pre-wrap;
    margin: 3rem 0;
    text-align: center;
    color: #2c3e50;
    position: relative;
    padding: 2rem 0;
}

.poem-content::before {
    content: '"';
    position: absolute;
    top: -1rem;
    left: -2rem;
    font-size: 4rem;
    color: #e74c3c;
    opacity: 0.3;
    font-family: 'Playfair Display', serif;
}

.poem-content::after {
    content: '"';
    position: absolute;
    bottom: -3rem;
    right: -2rem;
    font-size: 4rem;
    color: #e74c3c;
    opacity: 0.3;
    font-family: 'Playfair Display', serif;
}

.poem-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #ecf0f1;
    position: relative;
}

.poem-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #e74c3c 100%);
}

.poem-header h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.poem-date {
    color: #95a5a6;
    font-style: italic;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Search */
.search-container {
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    border: 2px solid #ecf0f1;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #e74c3c;
}

/* Tag filters */
.tag-filters {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tag-filter {
    background: #ecf0f1;
    color: #2c3e50;
    border: none;
    border-radius: 25px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.tag-filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.tag-filter:hover::before {
    left: 100%;
}

.tag-filter:hover {
    background: #e74c3c;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.tag-filter.active {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

/* Poems section header */
.poems-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Dark theme adjustments for search and filters */
body.dark .search-input {
    background: #232b39;
    color: #f1f1f1;
    border-color: #444;
}

body.dark .search-input:focus {
    border-color: #e74c3c;
}

body.dark .tag-filter {
    background: #2c3e50;
    color: #f1f1f1;
}

body.dark .tag-filter:hover,
body.dark .tag-filter.active {
    background: #e74c3c;
    color: #fff;
}

/* Loading */
.loading {
    display: none; /* hidden by default, JS will show when needed */
    text-align: center;
    padding: 1rem 0;
}

/* If an element is marked with data-loading-visible, show immediately (used by JS when needed) */
[data-loading-visible="true"].loading {
    display: block !important;
}

.loading .spinner {
    margin: 0.5rem auto;
}

/* Ensure loading blocks span grid where used */
.loading.full-width {
    grid-column: 1 / -1;
}

/* Utility to hide via JS */
.hidden { display: none !important; }

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 3rem 2rem 2rem;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #e74c3c 100%);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: start;
}

.footer-brand h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.footer-brand p {
    color: #b2bec3;
    font-style: italic;
}

.footer-links h4,
.footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #b2bec3;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #e74c3c;
}

.footer-social {
    text-align: center;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid transparent;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    border-color: #e74c3c;
}

.social-icon-inner {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-icon:hover .social-icon-inner {
    transform: scale(1.2) rotate(15deg);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-tagline {
    margin-top: 0.5rem;
    color: #b2bec3;
    font-style: bold;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}

body.dark .footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 100%);
}

body.dark .footer-links a {
    color: #b2bec3;
}

body.dark .footer-links a:hover {
    color: #e74c3c;
}

body.dark .social-icon {
    background: rgba(255, 255, 255, 0.05);
}

body.dark .social-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .main {
        padding: 1rem;
    }

    .poems-grid {
        grid-template-columns: 1fr;
    }
    
    .poem-article {
        padding: 2rem 1rem;
    }
    
    .poem-header h1 {
        font-size: 2rem;
    }
}

/* Responsive adjustments (concise) */
/* Make header/nav responsive without adding JS (simple stacking) */
.nav { padding: 1rem; }
.nav-menu { gap: 1rem; display:flex; flex-wrap:wrap; }
.nav-brand { flex: 1 1 auto; }

/* Smaller screens */
@media (max-width: 900px) {
    .poems-grid { grid-template-columns: repeat(2, 1fr); }
    .nav { padding: 0.75rem 1rem; }
    .nav-brand h1 { font-size: 1.4rem; }
    .nav-brand p { display:none; }
    .footer .footer-content { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
    .poems-grid { grid-template-columns: 1fr; }
    .poems-section { padding: 1rem; }
    .nav { padding: 0.5rem 0.75rem; }
    .nav-menu { width: 100%; justify-content: flex-start; gap: 0.75rem; }
    .nav-link { font-size: 0.95rem; }
    .theme-toggle { width: 44px; height: 44px; bottom: 0.75rem; left: 0.75rem; }
    .poem-card { padding: 0.9rem; }
    .poem-title { font-size: 1.05rem; }
    .poem-excerpt { font-size: 0.95rem; }
    #scroll-top-btn { right: 1rem; bottom: 5.5rem; }
    .footer .footer-content { padding: 1rem; }
}

/* Tiny devices */
@media (max-width: 400px) {
    .nav-brand h1 { font-size: 1.2rem; }
    .nav-menu { gap: 0.5rem; }
    .poem-excerpt { font-size: 0.9rem; }
    .poem-meta { font-size: 0.85rem; }
}

/* Accessibility: ensure interactive elements are large enough on touch */
button, .btn, .like-btn, .copy-link-btn, .share-btn { min-height: 40px; padding: 0.4rem 0.9rem; }

/* Ensure loading spinner center on small screens */
.loading { display: none; }
.loading[style], .loading[aria-hidden="false"] { display: block; }

/* Responsive helper utilities */
.hide-on-mobile { display: none !important; }

.see-more {
  display: inline-block;
  margin: 0.5rem 0 1rem 0;
  background: transparent;
  border: 0;
  color: #667eea;
  font-weight: 600;
  cursor: pointer;
}

.collapsed { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Mobile-specific adjustments */
@media (max-width: 768px) {
  .footer .footer-links { display: none; }
  .footer .footer-brand p { display: none; }
  .poem-meta { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
  .poems-grid { grid-template-columns: 1fr; }
  .poem-card { padding: 0.8rem; }
  .poem-title { font-size: 1rem; }
  .poem-excerpt { font-size: 0.95rem; }
  .analytics-controls { justify-content: space-between; }
}

/* Small-device poem layout and action button improvements */
@media (max-width: 480px) {
  /* reduce overall article padding and margins for compact mobile view */
  .poem-article {
    padding: 0.4rem 0.4rem;
    margin: 0.4rem;
    max-width: 100%;
  }

  .poem-header h1 {
    font-size: 1rem;
    line-height: 1.2;
  }

  /* Reduce poem content font size and line height for better readability */
  .poem-content {
    font-size: 1rem;
    line-height: 1.6;
    padding: 0 0.5rem;
  }

  /* Make poem-extra spans smaller width and more readable */
  .poem-extra {
    flex-direction: row;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding-top: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
  }

  .poem-extra span {
    background: #f0f0f0;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    display: inline-block;
    font-size: 0.8rem;
    min-width: auto;
    flex-shrink: 0;
  }

  /* Make action buttons smaller and aligned center */
  .poem-actions {
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
  }
  .poem-actions button {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    min-width: auto;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(16,24,40,0.08);
    flex: 0 0 auto;
  }

  /* Like button visuals for mobile and desktop: bright gradient when liked */
  .like-btn {
    background: linear-gradient(90deg, #667eea 0%, #5a67d8 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
  }
  .like-btn .like-count { font-weight: 700; }
  .like-btn.liked {
    background: linear-gradient(90deg, #ff7b7b 0%, #ff5252 100%);
    transform: none;
  }

  /* Keep buttons accessible on focus */
  .poem-actions button:focus { outline: 3px solid rgba(102,126,234,0.18); outline-offset: 2px; }

  /* Adjust share menu positioning to avoid overflow on mobile */
  .share-menu {
    right: auto !important;
    left: 12px !important;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
  }
}

/* Desktop enhancements: make like state visible with slight shadow */
@media (min-width: 769px) {
  .poem-actions button {
    box-shadow: 0 8px 20px rgba(16,24,40,0.06);
  }
  .like-btn.liked {
    background: linear-gradient(90deg, #ff6b6b 0%, #ff4757 100%);
  }
}

/* Poem page small-screen tweaks: center nav, emphasize quotes, smaller action buttons */
@media (max-width: 768px) {
  /* ensure header/nav centered on small devices (applies site-wide) */
  .nav { flex-direction: column; align-items: center; gap: 0.4rem; }
  .nav-brand { text-align: center; }
  .nav-menu { justify-content: center; }

  /* make quotation marks slightly more prominent on smaller screens */
  .poem-content::before, .poem-content::after { color: rgba(102,126,234,0.14); }

  /* reduce action button size specifically for poem view */
  .poem-actions button {
    padding: 0.35rem 0.6rem;
    font-size: 0.9rem;
    min-width: 72px;
    border-radius: 6px;
  }
}

@media (max-width: 420px) {
  .poem-actions button {
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
    min-width: 64px;
  }
}

/* Share Options Modal Styles */
.share-options-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.share-options-modal.visible {
    opacity: 1;
    visibility: visible;
}

.share-options-modal .modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.share-options-modal.visible .modal-content {
    transform: scale(1);
}

.share-options-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ecf0f1;
}

.share-options-modal .modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.share-options-modal .close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-options-modal .close-btn:hover {
    background: #f8f9fa;
    color: #e74c3c;
}

.share-options-modal .share-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.share-options-modal .share-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.share-options-modal .share-option:hover {
    border-color: #e74c3c;
    background: #fdf2f2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.1);
}

.share-options-modal .share-option .icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.share-options-modal .share-option.copy .icon {
    background: #f8f9fa;
    color: #2c3e50;
}

.share-options-modal .share-option.twitter .icon {
    background: #1da1f2;
    color: white;
}

.share-options-modal .share-option.facebook .icon {
    background: #1877f2;
    color: white;
}

.share-options-modal .share-option.whatsapp .icon {
    background: #25d366;
    color: white;
}

.share-options-modal .share-option.email .icon {
    background: #ea4335;
    color: white;
}

.share-options-modal .share-option .option-text {
    flex: 1;
}

.share-options-modal .share-option .option-text h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.share-options-modal .share-option .option-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Dark theme for share modal */
body.dark .share-options-modal {
    background: rgba(0, 0, 0, 0.7);
}

body.dark .share-options-modal .modal-content {
    background: #1a1a1a;
    color: #f1f1f1;
    border: 1px solid #333;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

body.dark .share-options-modal .modal-header {
    border-bottom-color: #333;
}

body.dark .share-options-modal .modal-header h3 {
    color: #f1f1f1;
}

body.dark .share-options-modal .close-btn {
    color: #b2bec3;
    background: #2a2a2a;
}

body.dark .share-options-modal .close-btn:hover {
    background: #3a3a3a;
    color: #e74c3c;
}

body.dark .share-options-modal .share-option {
    border-color: #333;
    color: #f1f1f1;
    background: #2a2a2a;
}

body.dark .share-options-modal .share-option:hover {
    border-color: #e74c3c;
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.2);
}

body.dark .share-options-modal .share-option .option-text h4 {
    color: #f1f1f1;
}

body.dark .share-options-modal .share-option .option-text p {
    color: #b2bec3;
}

body.dark .share-options-modal .share-option.copy .icon {
    background: #3a3a3a;
    color: #f1f1f1;
}

body.dark .share-options-modal .share-option.twitter .icon {
    background: #1da1f2;
    color: white;
}

body.dark .share-options-modal .share-option.facebook .icon {
    background: #1877f2;
    color: white;
}

body.dark .share-options-modal .share-option.whatsapp .icon {
    background: #25d366;
    color: white;
}

body.dark .share-options-modal .share-option.email .icon {
    background: #ea4335;
    color: white;
}

/* Mobile responsive for share modal */
@media (max-width: 480px) {
    .share-options-modal .modal-content {
        padding: 1.5rem;
        margin: 1rem;
        width: calc(100% - 2rem);
    }

    .share-options-modal .modal-header h3 {
        font-size: 1.3rem;
    }

    .share-options-modal .share-option {
        padding: 0.75rem;
    }

    .share-options-modal .share-option .icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Favorite button styles */
.favorite-btn {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.favorite-btn:hover {
  background-color: #c0392b;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.6);
}

.favorite-btn.favorited {
  background-color: #27ae60;
  box-shadow: 0 0 10px rgba(39, 174, 96, 0.8);
}

.favorite-btn.favorited:hover {
  background-color: #219150;
  box-shadow: 0 0 12px rgba(33, 145, 80, 1);
}

/* Dark theme overrides for favorite button */
body.dark .favorite-btn {
  background-color: #c0392b;
  color: white;
}

body.dark .favorite-btn:hover {
  background-color: #e74c3c;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.8);
}

body.dark .favorite-btn.favorited {
  background-color: #27ae60;
  box-shadow: 0 0 10px rgba(39, 174, 96, 0.9);
}

body.dark .favorite-btn.favorited:hover {
  background-color: #1e8449;
  box-shadow: 0 0 12px rgba(30, 132, 73, 1);
}

/* Authentication Page Styles */
.auth-page {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #e74c3c 100%);
}

.auth-container {
  position: relative;
  z-index: 1;
}

.auth-tabs {
  display: flex;
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.tab {
  flex: 1;
  padding: 1rem;
  background: #f8f9fa;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: #7f8c8d;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tab.active {
  background: linear-gradient(135deg, #667eea 0%, #e74c3c 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tab:hover:not(.active) {
  background: #e9ecef;
  color: #495057;
}

.auth-form {
  animation: fadeIn 0.3s ease;
}

.auth-form.hidden {
  display: none;
}

.auth-form h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #2c3e50;
  text-align: center;
  font-weight: 700;
}

.auth-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #495057;
  font-size: 0.95rem;
}

.auth-form input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  background: #fff;
  color: #2c3e50;
  box-sizing: border-box;
}

.auth-form input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-form input::placeholder {
  color: #adb5bd;
}

.auth-form button {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.auth-form button:hover {
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.auth-form button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
}

/* Dark theme for auth forms */
body.dark .auth-page {
  background: #232b39;
  color: #f1f1f1;
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

body.dark .auth-tabs {
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

body.dark .tab {
  background: #2c3e50;
  color: #b2bec3;
}

body.dark .tab.active {
  background: linear-gradient(135deg, #667eea 0%, #e74c3c 100%);
  color: white;
}

body.dark .tab:hover:not(.active) {
  background: #34495e;
  color: #ecf0f1;
}

body.dark .auth-form h2 {
  color: #f1f1f1;
}

body.dark .auth-form label {
  color: #ecf0f1;
}

body.dark .auth-form input {
  background: #34495e;
  border-color: #444;
  color: #f1f1f1;
}

body.dark .auth-form input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

body.dark .auth-form input::placeholder {
  color: #7f8c8d;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive design for auth forms */
@media (max-width: 600px) {
  .auth-page {
    margin: 1rem;
    padding: 1.5rem;
  }

  .auth-form h2 {
    font-size: 1.8rem;
  }

  .tab {
    padding: 0.8rem;
    font-size: 1rem;
  }

  .auth-form input {
    padding: 0.9rem;
    font-size: 0.95rem;
  }

  .auth-form button {
    padding: 0.9rem;
    font-size: 1rem;
  }
}

@media (max-width: 400px) {
  .auth-page {
    margin: 0.5rem;
    padding: 1rem;
  }

  .auth-form h2 {
    font-size: 1.6rem;
  }

  .tab {
    padding: 0.7rem;
    font-size: 0.9rem;
  }
}

/* Poem signature styles */
.poem-signature {
    text-align: left;
    font-style: italic;
    color: #7f8c8d;
}

