/* Основные стили */
:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

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

/* Шапка */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--dark-color);
}

.logo span {
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Герой секция */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../images/library-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 20px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
}

/* Особенности */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.feature {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.feature:hover {
    transform: translateY(-10px);
}

.feature i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Книги */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.book-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

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

.book-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.book-card .book-info {
    padding: 20px;
}

.book-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.book-card .author {
    color: #666;
    margin-bottom: 10px;
}

.book-card .meta {
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
}

.book-card .availability {
    font-weight: bold;
    margin-bottom: 15px;
}

/* Админ панель */
.admin-container {
    display: flex;
    min-height: calc(100vh - 150px);
}

.admin-sidebar {
    width: 250px;
    background: var(--dark-color);
    color: white;
    padding: 20px 0;
}

.admin-sidebar nav ul {
    display: flex;
    flex-direction: column;
    list-style: none;
}

.admin-sidebar nav ul li {
    margin: 0;
}

.admin-sidebar nav ul li a {
    display: block;
    padding: 15px 20px;
    color: var(--light-color);
    transition: all 0.3s;
}

.admin-sidebar nav ul li a:hover {
    background: rgba(255,255,255,0.1);
}

.admin-sidebar nav ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.admin-sidebar nav ul li.active a {
    background: var(--primary-color);
}

.admin-content {
    flex: 1;
    padding: 30px;
    background: #f5f5f5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
}

.stat-card h3 {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 28px;
    font-weight: bold;
    color: var(--dark-color);
}

.stat-card i {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 40px;
    color: rgba(0,0,0,0.1);
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
}

tr:hover {
    background: #f5f5f5;
}

.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.status.выдана {
    background: var(--warning-color);
}

.status.возвращена {
    background: var(--success-color);
}

.status.просрочена {
    background: var(--danger-color);
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group textarea {
    min-height: 150px;
}

/* Подвал */
footer {
    background: var(--dark-color);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: left;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bbb;
    transition: color 0.3s;
}

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

.copyright {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #bbb;
    font-size: 14px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .features {
        grid-template-columns: 1fr;
    }
    
    .header-container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
    }
}
/* Стили для страницы авторизации */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 40px 0;
}

.auth-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.auth-form button {
    width: 100%;
    padding: 12px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.auth-links a {
    color: var(--primary-color);
}

.alert {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
/* Стили для личного кабинета */
.account-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.account-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.account-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.account-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 20px;
}

.account-section h2 i {
    margin-right: 10px;
    color: var(--primary-color);
}

.loans-table {
    overflow-x: auto;
}

.loans-table table {
    width: 100%;
    border-collapse: collapse;
}

.loans-table th, 
.loans-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.loans-table th {
    background: var(--primary-color);
    color: white;
}

.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.status.выдана {
    background: var(--warning-color);
}

.status.возвращена {
    background: var(--success-color);
}

.status.просрочена {
    background: var(--danger-color);
}

@media (max-width: 768px) {
    .account-sections {
        grid-template-columns: 1fr;
    }
}
/* Стили для каталога книг */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.book-filters {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

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

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.book-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.book-cover img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.book-info {
    padding: 15px;
}

.book-info h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.3;
}

.book-info .author {
    color: #666;
    margin: 0 0 10px;
    font-size: 15px;
}

.book-info .meta {
    color: #888;
    font-size: 14px;
    margin: 0 0 10px;
}

.book-info .meta span {
    display: inline-block;
    margin-right: 5px;
}

.availability {
    margin: 10px 0;
    font-weight: 500;
}

.in-stock {
    color: #27ae60;
}

.out-of-stock {
    color: #e74c3c;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.page-link {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .filter-form {
        grid-template-columns: 1fr;
    }
    
    .books-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .books-grid {
        grid-template-columns: 1fr;
    }
}
/* Стили для страницы мероприятий */
.events-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.events-header {
    text-align: center;
    margin-bottom: 40px;
}

.events-header h1 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.events-header p {
    font-size: 1.1rem;
    color: #666;
}

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

.filter-tabs {
    display: flex;
    background: #f5f5f5;
    border-radius: 50px;
    padding: 5px;
}

.filter-tab {
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: all 0.3s;
}

.filter-tab:hover, .filter-tab.active {
    background: var(--primary-color);
    color: white;
}

.category-filter select {
    padding: 10px 15px;
    border-radius: 50px;
    border: 1px solid #ddd;
    background: white;
    font-size: 1rem;
    min-width: 200px;
}

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

.event-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.event-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.event-image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.event-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.event-details {
    padding: 20px;
}

.event-date {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: bold;
}

.event-date .day {
    font-size: 1.5rem;
}

.event-date .month {
    text-transform: uppercase;
}

.event-date .time {
    margin-left: auto;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.event-title {
    margin: 0 0 15px;
    font-size: 1.3rem;
    line-height: 1.3;
}

.event-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.event-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

.event-description {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
}

.event-actions {
    display: flex;
    gap: 10px;
}

.no-events {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
}

.no-events img {
    margin-bottom: 20px;
}

.no-events h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.no-events p {
    margin-bottom: 20px;
    color: #666;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.page-link:hover, .page-link.active {
    background: var(--primary-color);
    color: white;
}

.page-link.first, .page-link.last, .page-link.prev, .page-link.next {
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
}

.page-dots {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    color: #999;
}

@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .events-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-tabs {
        overflow-x: auto;
        padding-bottom: 10px;
    }
}
/* Стили для страницы контактов */
.contacts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.contact-info {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 20px;
    color: var(--primary-color);
    margin-top: 3px;
}

.contact-item h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.social-links {
    margin-top: 30px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border-radius: 50%;
    color: var(--dark-color);
    font-size: 18px;
    transition: all 0.3s;
}

.social-icons a:hover {
    background: var(--primary-color);
    color: white;
}

.feedback-form {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.feedback-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.feedback-form input,
.feedback-form textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 15px;
}

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

.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-image {
    padding: 5px;
    background: #f0f0f0;
    border-radius: 4px;
}

.map-container {
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .contacts-container {
        grid-template-columns: 1fr;
    }
    
    .event-card {
        flex-direction: column;
    }
    
    .event-date {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        padding: 10px;
    }
    
    .event-date .day,
    .event-date .month {
        margin: 0;
    }
}