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

:root {
    --primary-color: #bf1120;
    --primary-color-dark: #0c0c0c;
    --color-secondary: #3a3a3a;
    --color-accent: #7d2929;
    --accent-color: #bf1120;
    --success-color: #27ae60;
    --text-color: #2b2b2b;
    --text-color-light: #676767;
    --text-secondary: #5a5a5a;
    --bg-color: #f0f0f0;
    --background-color: #f0f0f0;
    --background-light: #f0f0f0;
    --card-bg: #ffffff;
    --bg-light: #c2c2c2;
    --border-color: #c2c2c2;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

body {
    font-family: 'Readex Pro', sans-serif;
    direction: rtl;
    text-align: right;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Navigation */
.navbar {
    background: var(--background-color);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 2rem;
}

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

.nav-brand h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.nav-brand .tagline {
    font-size: 0.9rem;
    color: var(--text-color-light);
}

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

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-family: 'Readex Pro', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(125, 41, 41, 0.2);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 8px 25px rgba(125, 41, 41, 0.2);
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--background-color) 0%, var(--background-light) 100%);
    color: var(--text-color);
    padding: 5rem 0;
    text-align: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

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

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

/* Features Section */
.features {
    padding: 4rem 0;
}

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

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

.feature-card {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

.feature-card ul {
    list-style: none;
    padding: 0;
}

.feature-card li {
    padding: 0.5rem 0;
    padding-right: 1.5rem;
    position: relative;
}

.feature-card li:before {
    content: "✓";
    position: absolute;
    right: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Problems Section */
.problems {
    padding: 4rem 0;
    background: var(--card-bg);
}

.problems-list {
    max-width: 800px;
    margin: 0 auto;
}

.problem-item {
    display: flex;
    align-items: start;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--background-light);
    border-radius: 8px;
    border-right: 4px solid var(--primary-color);
}

.problem-number {
    background: var(--primary-color);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* Forms */
.form-container {
    max-width: 600px;
    margin: 2rem auto;
    background: var(--background-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Readex Pro', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(191, 17, 32, 0.1);
}

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

/* Dashboard */
.dashboard {
    padding: 2rem 0;
}

.dashboard-section {
    animation: fadeIn 0.3s ease-in;
    min-height: 200px;
}

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

@media (max-width: 768px) {
    .dashboard-nav {
        gap: 0;
    }
    
    .dashboard-nav a {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}

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

.dashboard-title {
    font-size: 2rem;
    color: var(--primary-color);
}

.dashboard-nav {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-nav::-webkit-scrollbar {
    height: 4px;
}

.dashboard-nav::-webkit-scrollbar-track {
    background: var(--background-light);
}

.dashboard-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.dashboard-nav a {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    color: var(--text-color-light);
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    margin-bottom: -2px;
    white-space: nowrap;
    cursor: pointer;
}

.dashboard-nav a:hover {
    color: var(--primary-color);
    background: rgba(191, 17, 32, 0.05);
}

.dashboard-nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
    font-weight: 600;
}

.dashboard-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px 2px 0 0;
}

/* Cards */
.card {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease;
}

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

.card-title {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-new { background: #e3f2fd; color: #1976d2; }
.status-review { background: #fff3e0; color: #f57c00; }
.status-accepted { background: #e8f5e9; color: #388e3c; }
.status-rejected { background: #ffebee; color: #d32f2f; }
.status-published { background: #f3e5f5; color: #7b1fa2; }

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
}

table th,
table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background: var(--border-color);
    color: var(--background-color);
    font-weight: 600;
}

table tr:hover {
    background: var(--background-light);
}

/* Footer */
.footer {
    background: var(--background-color);
    border-top: 1px solid var(--border-color);
    color: var(--text-color-light);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Workflow Stages */
.workflow-stages {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.workflow-stage {
    flex: 1;
    font-size: 0.8rem;;
    min-width: 150px;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    text-align: center;
    position: relative;
}

.workflow-stage.active {
    background: var(--primary-color);
    color: white;
}

.workflow-stage.completed {
    background: var(--success-color);
    color: white;
}

/* Review Form */
.review-form {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border: 1px solid rgba(0,0,0,0.05);
}

.rating-input {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.rating-input input {
    width: 80px;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(191, 17, 32, 0.05);
}

.file-upload-area input[type="file"] {
    display: none;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-right: 4px solid var(--success-color);
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-right: 4px solid var(--accent-color);
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-right: 4px solid var(--primary-color);
}

/* Books Section */
.books-section {
    padding: 4rem 0;
    background: var(--background-color);
}

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

.book-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

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

.book-cover {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--color-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.book-placeholder {
    font-size: 4rem;
    opacity: 0.3;
}

.book-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.book-author {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.book-description {
    font-size: 0.95rem;
    color: var(--text-color-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.book-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

.book-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.book-reviews {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .book-cover {
        height: 180px;
    }
}

/* Book Page */
.book-page {
    padding: 2rem 0;
    min-height: 80vh;
}

.breadcrumb {
    color: var(--text-color-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-color-light);
    margin: 0 0.5rem;
}

/* Book Header */
.book-header {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.book-cover-large {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.book-cover-image {
    width: 100%;
    height: 350px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--color-accent) 100%);
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-placeholder-large {
    font-size: 6rem;
    opacity: 0.3;
}

.book-header-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.book-page-title {
    font-size: 2.5rem;
    color: var(--text-color);
    margin: 0;
    font-weight: 700;
}

.book-page-author {
    font-size: 1.2rem;
    color: var(--text-color-light);
    margin: 0;
}

.author-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.author-link:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.book-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

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

.book-description-full {
    margin-top: 1rem;
}

.book-description-full h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.book-description-full p {
    color: var(--text-color-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Book Tabs */
.book-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-color-light);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Readex Pro', sans-serif;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(191, 17, 32, 0.05);
}

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

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

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

/* Book Reader */
.book-reader {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.reader-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.reader-btn {
    padding: 0.5rem 1rem;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: 'Readex Pro', sans-serif;
}

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

.reader-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    font-family: 'Readex Pro', sans-serif;
    cursor: pointer;
}

.book-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    line-height: 1.8;
    font-size: 16px;
    color: var(--text-color);
    background: var(--card-bg);
    border-radius: 8px;
    min-height: 400px;
}

.book-content h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.book-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.reader-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.page-info {
    color: var(--text-color-light);
    font-weight: 500;
}

/* Reviews Section */
.reviews-section {
    margin-bottom: 2rem;
}

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

.reviews-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.05);
}

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

.reviewer-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
}

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

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

.review-rating {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

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

.review-content p {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 1rem;
}

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

.review-tags .tag {
    background: rgba(191, 17, 32, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Book Details */
.book-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.detail-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.05);
}

.detail-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.details-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.details-list li:last-child {
    border-bottom: none;
}

.details-list a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.details-list a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 968px) {
    .book-header {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .book-cover-large {
        position: static;
        max-width: 250px;
        margin: 0 auto;
    }
    
    .book-page-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .book-page-author {
        text-align: center;
    }
    
    .book-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .book-tabs {
        overflow-x: auto;
    }
    
    .tab-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .book-content {
        padding: 1rem;
        font-size: 14px;
    }
    
    .reader-controls {
        flex-wrap: wrap;
    }
    
    .reviews-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .book-details-grid {
        grid-template-columns: 1fr;
    }
}
