/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B5CF6;
    --primary-dark: #7C3AED;
    --secondary-color: #F59E0B;
    --accent-color: #EC4899;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-accent: #F3F4F6;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    --gradient-secondary: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
}

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    direction: rtl;
    font-size: 16px;
}

.site-container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: var(--bg-primary);
}

.container {
    max-width: 1280px; /* Slightly wider for modern screens */
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    margin-top: 80px; /* Adjust based on header height */
    padding: 2rem 0;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

/* Admin Button */
.btn-admin {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-admin:hover {
    background: linear-gradient(135deg, #ee5a24, #ff6b6b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

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

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

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

.navbar .nav-brand a {
    text-decoration: none;
}

.navbar .nav-brand a:hover {
    text-decoration: none;
}

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

.nav-logo {
    height: 100px; /* A bit larger for better visibility */
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

/* Removed old emoji - now using feather icon */

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

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: white;
    padding: 2rem 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.mobile-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mobile-nav-link {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary-color);
    background: var(--bg-accent);
    border-color: var(--border-color);
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 90vh; /* Reduced height slightly */
    padding: 4rem 2rem;
    background: var(--bg-primary); /* Set to primary white */
}

.hero-content {
    text-align: right;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    height: 500px;
}

.featured-poem-section {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 100%;
}

.featured-poem-badge {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #8b4513;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: glow 2s ease-in-out infinite alternate;
    border: 2px solid #ffed4e;
}

.featured-poem-badge i {
    font-size: 1.2rem;
    animation: bounce 1.5s ease-in-out infinite;
}

@keyframes glow {
    0% {
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    }
    100% {
        box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

.floating-poems {
    position: relative;
    height: 100%;
}

.poem-card {
    position: absolute;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-size: 1.2rem;
    color: var(--text-primary);
    max-width: 350px;
    text-align: center;
    line-height: 1.8;
    border: 2px solid #ffd700;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}


.poem-card .poem-title {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.poem-card .poem-text {
    color: #34495e;
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.poem-card .poet-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 215, 0, 0.3);
}

.poem-card .poet-name {
    color: #8b4513;
    font-weight: 600;
    font-size: 1rem;
}

.poem-card:hover {
    transform: translate(-50%, -50%) translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.poem-card.floating:nth-child(1) {
    top: 30%;
    transform: translate(-50%, -50%);
    animation: float 6s ease-in-out infinite;
}

.poem-card.floating:nth-child(2) {
    top: 50%;
    right: 20%;
    animation: float 6s ease-in-out infinite 2s;
}

.poem-card.floating:nth-child(3) {
    bottom: 20%;
    left: 30%;
    animation: float 6s ease-in-out infinite 4s;
}

/* Top poem styling */
.floating-poems {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 2rem;
}

.floating-poems .poem-item {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.floating-poems .poem-item .poet-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-direction: row;
}

.floating-poems .poem-item .poet-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}


@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Floating animation for specific poem */
@keyframes floatingPoem {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    25% { 
        transform: translateY(-8px) rotate(1deg); 
        box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.15);
    }
    50% { 
        transform: translateY(-15px) rotate(0deg); 
        box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.2);
    }
    75% { 
        transform: translateY(-8px) rotate(-1deg); 
        box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.15);
    }
}

/* Apply floating animation to poem with ID 22 */
.poem-item.floating-poem-special {
    animation: floatingPoem 4s ease-in-out infinite;
    position: relative;
    z-index: 10;
}

.poem-item.floating-poem-special:hover {
    animation-play-state: paused;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.25);
}



/* Features Section */
.features {
    padding: 6rem 0;
    background: var(--bg-primary);
    margin-top: 80px; /* اضافه کردن margin-top برای جلوگیری از پوشانده شدن توسط هدر */
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Recent Poems Section */
.recent-poems {
    padding: 4rem 0; /* Adjusted padding */
    background: transparent;
}

.poems-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section h3 i {
    font-size: 1.2rem;
    color: var(--primary-color);
    animation: float 3s ease-in-out infinite;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: var(--text-light);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.modal-content::-webkit-scrollbar {
    display: none; /* WebKit */
}

.close {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--text-primary);
}

.modal h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Textarea Styles */
textarea {
    width: 100%;
    min-height: 120px;
    max-height: 200px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    color: var(--text-primary);
    transition: all 0.2s ease;
    overflow-y: auto;
}

/* Search and Filter Styles */
.search-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-result-info {
    margin-bottom: 1rem;
}

.search-result-count {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-result-count i {
    font-size: 1rem;
}

.search-box {
    display: flex;
    flex: 1;
    min-width: 300px;
}

.search-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    transition: border-color 0.2s ease;
    direction: rtl;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box button {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem 0 0 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    background: var(--primary-dark);
}

.filter-options select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    font-size: 1rem;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    cursor: pointer;
    direction: rtl;
    transition: border-color 0.2s ease;
}

.filter-options select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

/* Hidden scrollbars for textarea */
textarea {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

textarea::-webkit-scrollbar {
    display: none; /* WebKit */
}

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

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Poet Suggestions Styles */
.poet-suggestions-container {
    position: relative;
}

.poet-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.poet-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.poet-suggestion-item:hover {
    background-color: #f8f9fa;
}

.poet-suggestion-item:last-child {
    border-bottom: none;
}

.poet-suggestion-name {
    font-weight: 500;
    color: #333;
}

.poet-suggestion-count {
    font-size: 0.85rem;
    color: #666;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
}

.poet-suggestion-item:hover .poet-suggestion-name {
    color: var(--primary-color);
}

.poet-suggestion-item:hover .poet-suggestion-count {
    background: var(--primary-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .poems-list {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 1rem 2rem;
    }
    
    /* Hide desktop menu and actions */
    .desktop-menu {
        display: none !important;
    }
    
    .desktop-actions {
        display: none !important;
    }
    
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 6rem 1rem 2rem;
        margin-top: 120px; /* افزایش margin-top در موبایل */
        background: white;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        height: 300px;
    }
    
    .featured-poem-badge {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        top: 15%;
    }
    
    .poem-card {
        max-width: 280px;
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .poem-card.floating:nth-child(1) {
        top: 30%;
        transform: translate(-50%, -50%);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .features {
        margin-top: 120px; /* افزایش margin-top در موبایل */
    }
    
    .poems-grid {
        max-width: 100%;
        padding: 0.5rem;
        gap: 1rem;
    }
    
    .recent-poems {
        margin-top: 120px; /* افزایش margin-top در موبایل */
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 1.5rem;
        max-height: 85vh;
    }
    
    .search-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    /* Mobile styles for poem items */
    .poem-item {
        width: 100%;
        padding: 1rem;
        margin: 0;
        font-size: 0.9rem;
    }
    
    /* Mobile styles for floating-poems only */
    .floating-poems .poem-item .poem-header {
        flex-direction: row;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .floating-poems .poem-item .poet-info {
        gap: 0.5rem;
        flex-direction: row-reverse;
        align-items: flex-start;
        justify-content: flex-start;
    }
    
    .floating-poems .poem-item .poet-details {
        flex: 1;
        text-align: right;
    }
    
    .floating-poems .poem-item .poet-avatar-placeholder {
        flex-shrink: 0;
    }
    
    .floating-poems .poem-item .poem-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .floating-poems .poem-item .poem-content {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 0.75rem;
    }
    
    .floating-poems .poem-item .poem-actions {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .floating-poems .poem-item .poem-actions .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-width: auto;
    }
    
    .floating-poems .poem-item .poem-actions-bottom {
        display: flex;
        gap: 0.5rem;
        justify-content: flex-start;
        margin-top: 0.75rem;
        flex-wrap: wrap;
    }
    
    .floating-poems .poem-item .poem-actions-bottom .btn-icon {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: auto;
    }
    
    .floating-poems .poem-item {
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 98%;
        padding: 1rem;
        max-height: 90vh;
    }
    
    .modal-content textarea {
        min-height: 100px;
        max-height: 150px;
        resize: vertical;
        font-family: inherit;
        line-height: 1.6;
        padding: 0.75rem;
        border: 1px solid var(--border-color);
        border-radius: 0.5rem;
        background: white;
        color: var(--text-primary);
        transition: border-color 0.2s ease;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* Internet Explorer 10+ */
    }
    
    .modal-content textarea::-webkit-scrollbar {
        display: none; /* WebKit */
    }
    
    .modal-content textarea:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn-large {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .hero {
        margin-top: 140px; /* افزایش بیشتر margin-top در موبایل‌های کوچک */
    }
    
    .features {
        margin-top: 140px;
    }
    
    .recent-poems {
        margin-top: 140px;
    }
    
    .search-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .filter-options select {
        width: 100%;
    }
    
    /* Extra mobile styles for poem items on very small screens */
    .poem-item {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .poem-title {
        font-size: 0.95rem;
    }
    
    .poem-content {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .poem-actions .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .poem-actions-bottom {
        gap: 0.4rem;
        margin-top: 0.5rem;
    }
    
    .poem-actions-bottom .btn-icon {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Mobile styles for floating-poems only on small screens */
    .floating-poems .poem-item .poet-info {
        flex-direction: row-reverse;
        align-items: flex-start;
        gap: 0.5rem;
        justify-content: flex-start;
    }
    
    .floating-poems .poem-item .poet-details {
        flex: 1;
        text-align: right;
        font-size: 0.75rem;
    }
    
    .floating-poems .poem-item .poet-avatar-placeholder {
        flex-shrink: 0;
    }
    
    .floating-poems .poem-item .poet-name {
        font-size: 0.85rem;
    }
}

/* User Avatar Styles */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c757d, #495057);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid #6c757d;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
    position: relative;
    overflow: hidden;
}

.user-avatar-placeholder:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Level-based user avatar styles */
.user-avatar-placeholder.level-1 {
    background: linear-gradient(135deg, #6c757d, #495057);
    border-color: #6c757d;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.user-avatar-placeholder.level-2 {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    border-color: #9c27b0;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

.user-avatar-placeholder.level-3 {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    border-color: #ffd700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}



/* Mobile User Avatar Styles */
.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-accent);
    border-radius: 0.5rem;
}

/* Poet Card Styles */
.poet-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    overflow: hidden;
    box-sizing: border-box;
    width: 400px;
    margin: 0 auto;
}

.poet-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.poet-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* .poet-avatar removed - using only placeholder */

/* .poet-avatar img removed - using only placeholder */

.poet-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-accent);
    border: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.5rem;
}

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

.poet-name {
    font-size: 1.3rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

.poet-bio {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    font-size: 0.9rem;
}

.poet-stats {
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--bg-accent);
    border-radius: 0.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.stat i {
    font-size: 1rem;
    color: var(--primary-color);
}

.stat span {
    font-weight: 500;
}

/* Poet Actions Styles */
.poet-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
    width: 100%;
    max-width: 100%;
}

.poet-actions .btn {
    flex: 1;
    min-width: 120px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .poet-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    /* .poet-avatar img removed - using only placeholder */
    
    .poet-avatar-placeholder {
        width: 70px;
        height: 70px;
    }
    
    .poet-stats {
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
    }
    
    .poet-actions {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        align-items: center;
    }
    
    .poet-actions .btn {
        max-width: none;
        width: 100%;
        min-width: auto;
        text-align: center;
        justify-content: center;
    }
}

/* Poets Grid Styles */
.poets-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    margin: 2rem 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .poets-grid {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .poet-card {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .poet-card .poet-main-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }
    
    .poet-card .poet-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
    
    .poet-card .poet-details {
        align-items: center;
        text-align: center;
    }
    
    .poet-card .poet-avatar-placeholder {
        width: 70px;
        height: 70px;
    }
}

/* Admin Panel Styles */
.admin-header {
    text-align: center;
    margin: 2rem 0 3rem 0;
}

.admin-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 1.5rem;
    color: white;
}

.stat-info h3 {
    font-size: 2rem;
    margin: 0;
    color: var(--text-primary);
}

.stat-info p {
    margin: 0;
    color: var(--text-secondary);
}

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tab-header h2 {
    color: var(--text-primary);
}

.poem-card, .user-card, .comment-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Poems List Container */
.poems-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    align-items: start;
}

/* Admin poems list should be in list layout */
body:has(.admin-stats) .poems-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

/* Override poems-grid for admin */
body:has(.admin-stats) .poems-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.poem-card:hover, .user-card:hover, .comment-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.poem-header, .comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.poem-content {
    margin-top: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.poem-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.poem-text {
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    white-space: pre-line;
    font-size: 1.1rem;
}

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

.tag {
    background: var(--bg-accent);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.poet-info, .comment-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.poet-info h4, .comment-info h4 {
    margin: 0;
    color: var(--text-primary);
}

.poem-date, .comment-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.poem-actions, .comment-actions {
    display: flex;
    gap: 0.5rem;
}

.poem-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.poem-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.approved {
    background-color: #D1FAE5;
    color: #065F46;
}

.status-badge.pending {
    background-color: #FEF3C7;
    color: #92400E;
}

.status-badge.rejected {
    background-color: #FEE2E2;
    color: #991B1B;
}

/* Poem List Items (Admin Panel) */
.poem-list-item {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.poem-list-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.poem-list-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    gap: 2rem;
}

.poem-main-info {
    flex: 1;
}

.poem-main-info .poem-title {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.poem-main-info .poet-name {
    margin: 0 0 0.25rem 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.poem-main-info .poem-date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.poem-list-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-success {
    background: #10B981;
    color: white;
}

.btn-danger {
    background: #EF4444;
    color: white;
}

.poem-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.poem-text {
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    white-space: pre-line;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    max-width: 600px;
    margin: 0 auto 1rem auto;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.user-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.user-avatar-section .user-avatar-placeholder {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

.poet-badge {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

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

.user-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.user-email {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.user-date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.user-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-item i {
    color: var(--primary-color);
    width: 16px;
}

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.no-data, .loading, .error {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.no-poems {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
    font-size: 1.1rem;
}

.no-poems-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-poems-content h3 {
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.no-poems-content p {
    margin-bottom: 1.5rem;
    color: #6b7280;
}

.no-poems-content .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.no-poems-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .user-card {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }
    
    .user-avatar-section {
        order: 1;
    }
    
    .user-info {
        order: 2;
    }
    
    .user-stats {
        order: 3;
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .user-actions {
        order: 4;
        width: 100%;
    }
    
    .user-actions .btn {
        width: 100%;
    }
    
    .poem-header, .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .poem-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .poem-actions .btn {
        flex: 1;
        min-width: 100px;
    }
    
    .poems-list {
        grid-template-columns: 1fr;
        padding: 0.5rem;
        gap: 1rem;
    }
    
    body:has(.admin-stats) .poems-list {
        padding: 0.5rem;
        gap: 0.75rem;
    }
    
    body:has(.admin-stats) .poems-grid {
        padding: 0.5rem;
        gap: 0.75rem;
    }
}

/* Admin Management Styles */
.admin-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.admin-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.admin-info p {
    margin: 0 0 0.5rem 0;
    color: var(--text-secondary);
}

.admin-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.admin-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.super-admin-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: inline-block;
}

.admin-badge {
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: inline-block;
}

.btn-warning {
    background: var(--secondary-color);
    color: white;
}

.btn-warning:hover {
    background: #D97706;
}

@media (max-width: 768px) {
    .admin-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .admin-actions {
        width: 100%;
        justify-content: center;
    }
}

/* Poems Page Styles */
.page-header {
    text-align: center;
    margin: 3rem 0;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.search-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    flex: 1;
    min-width: 300px;
}

.search-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0 0.5rem 0.5rem 0;
    font-size: 1rem;
}

.search-box button {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem 0 0 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    background: var(--primary-dark);
}

.filter-options select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    font-size: 1rem;
}

.load-more {
    text-align: center;
    margin: 3rem 0;
}

.poem-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    border-radius: 1rem; /* Restore radius */
    padding: 2rem 1.5rem;
    transition: all 0.3s ease;
    width: 100%;
    height: fit-content;
    min-height: auto;
    display: flex;
    flex-direction: column;
}

.poem-item:hover {
    transform: translateY(-3px); /* Subtle lift */
    box-shadow: var(--shadow-md); /* Slightly larger shadow on hover */
    background-color: var(--bg-primary);
}

.poem-actions-bottom {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-start;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.poem-actions-bottom .btn-icon {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    min-width: auto;
}

.poem-header {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.poet-info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
    flex-direction: row-reverse;
}

/* .poet-avatar removed - using only placeholder */

/* Level-based Avatar Styling for Poems - removed, using placeholder instead */

/* Level Badge for Poems */
.poet-level-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: bold;
    color: #fff;
    border: 2px solid var(--bg-primary);
}




.poet-level-badge.level-4 {
    background: #ffd700;
    color: #333;
}

.poet-level-badge.level-5 {
    background: #00bcd4;
}

.poet-avatar-placeholder {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.poet-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.poet-name {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.poem-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

.poem-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-icon:hover {
    background: var(--bg-accent);
    color: var(--text-primary);
}

.btn-icon i.liked {
    color: #EF4444;
}

.poem-content {
    margin-top: 1rem;
}

.poem-title {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.poem-actions-bottom {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-start;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.poem-text {
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    white-space: pre-line;
    font-size: 1.1rem;
}

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

.tag {
    background: var(--bg-accent);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .search-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .poem-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .poet-info {
        width: 100%;
    }
    
    .poem-actions-bottom {
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }
    
    .poem-title {
        font-size: 1.1rem;
    }
    
    .poem-text {
        font-size: 0.9rem;
    }
    
    .poet-name {
        font-size: 1rem;
    }
    
    .poem-date {
        font-size: 0.8rem;
    }
    
    .poem-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .poem-list-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        width: 100%;
    }
    
    .poem-list-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .poet-card .poet-main-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
    
    .poet-stats {
        gap: 1rem;
        justify-content: center;
    }
    
    .poet-stats .stat {
        text-align: center;
    }
    
    .poet-stats .stat i {
        display: inline;
        margin-right: 0.25rem;
    }
    
    .poet-actions {
        align-items: center;
    }
    
    .poet-actions .btn {
        text-align: center;
        justify-content: center;
        font-size: 0.8rem;
    }
    
    .poet-card .poet-name {
        font-size: 1.1rem;
    }
    
    .poet-card .poet-bio {
        font-size: 0.85rem;
    }
    
    .poet-stats .stat {
        font-size: 0.8rem;
    }
    
    .btn-icon {
        flex: 1;
        justify-content: center;
        font-size: 0.8rem;
    }
}

/* Poet Card Layout (Poets Page) */
.poet-card .poet-main-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* .poet-card .poet-avatar removed - using only placeholder */

.poet-card .poet-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Level-based Avatar Styling */
/* Level 1: خاکستری (0-49 لایک) */
.poet-avatar-placeholder.level-1 {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: #fff;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* Level 2: بنفش (50-199 لایک) */
.poet-avatar-placeholder.level-2 {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: #fff;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

/* Level 3: طلایی (200+ لایک) */
.poet-avatar-placeholder.level-3 {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #333;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    animation: goldGlow 2s ease-in-out infinite alternate;
}



/* About Page Styles */
.about-hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    margin-bottom: 3rem;
    border-radius: 1rem;
}

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

.about-hero p {
    font-size: 1.3rem;
    opacity: 0.9;
}

.about-content {
    margin-bottom: 4rem;
}

.about-text h2 {
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
    font-size: 1.8rem;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-accent);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.features-list li:hover {
    background: var(--primary-light);
    transform: translateX(5px);
}

.features-list li i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.team-section {
    margin-bottom: 4rem;
}

.team-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-size: 2rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.team-member {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.member-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}

.member-avatar i {
    font-size: 2rem;
    color: white;
}

.team-member h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.team-member p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-section {
    margin-bottom: 4rem;
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-size: 2rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    width: 60px;
    text-align: center;
}

.contact-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-secondary);
    margin: 0;
}

/* Avatar System Demo for About Page */
.avatar-system-demo {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg-accent);
    border-radius: 1rem;
}

/* Avatar base styles */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid;
    position: relative;
    transition: all 0.3s ease;
}

/* Level 1: خاکستری (0-49 لایک) */
.avatar.level-1 {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    border-color: #6c757d;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* Level 2: بنفش (50-199 لایک) */
.avatar.level-2 {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
    border-color: #9c27b0;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

/* Level 3: طلایی (200+ لایک) */
.avatar.level-3 {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #333;
    border-color: #ffd700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    animation: goldGlow 2s ease-in-out infinite alternate;
}

/* Avatar level badge */
.avatar-level-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    font-size: 8px;
    font-weight: bold;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-level-badge.level-1 {
    background: #6c757d;
}

.avatar-level-badge.level-2 {
    background: #9c27b0;
}

.avatar-level-badge.level-3 {
    background: #ffd700;
    color: #333;
}

.avatar-demo-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.avatar-demo-item .avatar {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.avatar-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.avatar-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* About Page Responsive Styles */
@media (max-width: 768px) {
    .about-hero h1 {
        font-size: 2rem;
    }
    
    .about-hero p {
        font-size: 1.1rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .avatar-system-demo {
        padding: 1rem;
    }
    
    .avatar-demo-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .avatar-demo-item .avatar {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Level Badge */
.poet-level-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: #fff;
    border: 2px solid var(--bg-primary);
}




.poet-level-badge.level-4 {
    background: #ffd700;
    color: #333;
}

.poet-level-badge.level-5 {
    background: #00bcd4;
}

/* Animations */
@keyframes goldGlow {
    0% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.4); }
    100% { box-shadow: 0 0 35px rgba(255, 215, 0, 0.6); }
}

@keyframes diamondGlow {
    0% { box-shadow: 0 0 30px rgba(0, 188, 212, 0.5); }
    100% { box-shadow: 0 0 40px rgba(0, 188, 212, 0.7); }
}

.poet-card .poet-info {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.poet-card .poet-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.poet-card .poet-name {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
}

.poet-card .poet-bio {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.mobile-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.mobile-user-avatar:hover {
    transform: scale(1.05);
}

.mobile-user-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c757d, #495057);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
    position: relative;
    overflow: hidden;
}

.mobile-user-avatar-placeholder:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Level-based mobile user avatar styles */
.mobile-user-avatar-placeholder.level-1 {
    background: linear-gradient(135deg, #6c757d, #495057);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.mobile-user-avatar-placeholder.level-2 {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

.mobile-user-avatar-placeholder.level-3 {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Comments Section Styles */
.comments-section {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.comments-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.comment-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.comment-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.comment-text {
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 0.9rem;
}

.btn-delete-comment {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.btn-delete-comment:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* Notification System */
.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(200%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 3000;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-left: 5px solid var(--primary-color);
    width: 90%;
    max-width: 450px;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
}

.notification-content i {
    font-size: 1.2rem;
}

.notification-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: var(--bg-accent);
    color: var(--text-primary);
}

.notification.notification-success {
    border-left-color: #10B981;
}
.notification.notification-success .notification-content i {
    color: #10B981;
}

.notification.notification-error {
    border-left-color: #EF4444;
}
.notification.notification-error .notification-content i {
    color: #EF4444;
}

.notification.notification-warning {
    border-left-color: #F59E0B;
}
.notification.notification-warning .notification-content i {
    color: #F59E0B;
}

.notification.notification-info {
    border-left-color: #3B82F6;
}
.notification.notification-info .notification-content i {
    color: #3B82F6;
}

/* General Error/Loading styles */
.loading, .no-data, .error {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
    border: 1px dashed var(--border-color);
}

.error {
    color: #991B1B;
    background-color: #FEE2E2;
    border-color: #FCA5A5;
}

/* Responsive notifications */
@media (max-width: 768px) {
    .notification {
        bottom: 10px;
        left: 10px;
        right: 10px;
        width: auto;
        transform: translateY(200%);
    }
    .notification.show {
        transform: translateY(0);
    }
}

/* Special decorative header for pages like 'About' */
.decorative-header {
    background: var(--bg-secondary); /* Use secondary for a subtle contrast */
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.library-header {
    text-align: center;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    margin-bottom: 3rem;
    background: transparent;
}

.theme-toggle {
    background: var(--bg-accent);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.theme-toggle i {
    transition: transform 0.4s ease;
}

body.dark-mode .theme-toggle i {
    transform: rotate(180deg);
}



