:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #1a252f;
    --text-color: #333;
    --text-light: #7f8c8d;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

[data-theme="dark"] {
    --primary-color: #34495e;
    --light-color: #2c3e50;
    --dark-color: #ecf0f1;
    --text-color: #ecf0f1;
    --text-light: #bdc3c7;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Source Sans Pro', sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
    transition: var(--transition);
}

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

/* Навигация */
.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

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

.logo i {
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.logo h1 {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
}

.theme-toggle {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: rotate(30deg);
}

/* Герой-секция */
.hero {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 4rem 0;
    min-height: 80vh;
}

.hero-content {
    flex: 1;
}

.hero h2 {
    font-family: 'Merriweather', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.tagline {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Иллюстрация книги */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.book-illustration {
    position: relative;
    width: 300px;
    height: 400px;
    perspective: 1000px;
}

.book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px 15px 15px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: var(--shadow);
    z-index: 2;
    transform: rotateY(-10deg);
}

.book-title {
    font-family: 'Merriweather', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.book-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
    padding: 0 1rem;
}

.book-pages {
    position: absolute;
    width: 95%;
    height: 98%;
    background: white;
    border-radius: 10px 15px 15px 10px;
    left: 5%;
    top: 1%;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.page {
    position: absolute;
    width: 90%;
    height: 90%;
    background: #f9f9f9;
    left: 5%;
    top: 5%;
    border-radius: 5px;
}

.page:nth-child(2) {
    top: 7%;
    left: 7%;
    background: #f5f5f5;
}

.page:nth-child(3) {
    top: 9%;
    left: 9%;
    background: #f0f0f0;
}

/* Секции */
.section {
    padding: 4rem 0;
}

.section h2 {
    font-family: 'Merriweather', serif;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-section {
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    padding: 3rem;
    margin: 2rem 0;
}

.dark-section h2 {
    color: white;
}

/* Карточки фактов */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--secondary-color);
}

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

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: white;
}

.science {
    background-color: #3498db;
}

.history {
    background-color: #e74c3c;
}

.nature {
    background-color: #2ecc71;
}

.tech {
    background-color: #9b59b6;
}

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

.card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.category-tag {
    display: inline-block;
    background-color: var(--light-color);
    color: var(--text-color);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Слайдер цитат */
.quote-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.quote {
    display: none;
    text-align: center;
    padding: 2rem;
}

.quote.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.quote-text {
    font-size: 1.8rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    color: white;
}

.quote-author {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.slider-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: white;
}

/* О проекте */
.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.features-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feature-item i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* Иллюстрация библиотеки */
.about-image {
    flex: 1;
}

.library-illustration {
    position: relative;
    height: 300px;
}

.bookshelf {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: #8B4513;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 0 20px 20px 20px;
}

.book {
    height: calc(var(--height, 180px) - 40px);
    background-color: var(--color, #4a6fa5);
    border-radius: 3px;
    box-shadow: inset 2px 0 0 rgba(255, 255, 255, 0.2);
}

.reading-lamp {
    position: absolute;
    top: 0;
    right: 50px;
    width: 100px;
    height: 150px;
}

.lamp-base {
    position: absolute;
    bottom: 0;
    left: 45px;
    width: 10px;
    height: 100px;
    background: #444;
    border-radius: 5px;
}

.lamp-arm {
    position: absolute;
    top: 30px;
    left: 45px;
    width: 80px;
    height: 10px;
    background: #444;
    transform-origin: left center;
    transform: rotate(-20deg);
}

.lamp-shade {
    position: absolute;
    top: 25px;
    left: 120px;
    width: 60px;
    height: 30px;
    background: #e74c3c;
    border-radius: 10px 10px 0 0;
}

.light-beam {
    position: absolute;
    top: 55px;
    left: 120px;
    width: 200px;
    height: 150px;
    background: linear-gradient(to bottom, rgba(255, 255, 200, 0.3), transparent);
    clip-path: polygon(0 0, 100% 0, 70% 100%, 30% 100%);
}

/* Футер */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

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

.footer-logo i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

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

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Адаптивность */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .section h2 {
        font-size: 1.8rem;
    }
    
    .quote-text {
        font-size: 1.4rem;
    }
}
