/* Основные стили */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #4fc3f7;
    --dark-color: #0a1128;
    --light-color: #f8f9fa;
    --golden-ratio: #daa520;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--light-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

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;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Шапка */
header {
    background-color: var(--dark-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    font-weight: 500;
}

/* Главный контент */
main {
    padding: 2rem 0;
}

/* Герой секция */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 10px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Генератор Фибоначчи */
.fibonacci-generator {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.sequence-container {
    margin-top: 2rem;
}

.sequence {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1rem 0;
}

.fib-number {
    display: inline-block;
    padding: 8px 12px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 5px;
    font-weight: bold;
}

.sequence-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

/* Факты */
.quick-facts {
    margin-bottom: 2rem;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.fact-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.fact-card:hover {
    transform: translateY(-5px);
}

.fact-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

/* Визуализация */
.visualization, .sequence-visual {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.controls {
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.canvas-container, .chart-container {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

canvas {
    background: white;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.spiral-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
}

/* Применение */
.applications-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.application-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.application-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.application-card:hover {
    transform: translateY(-5px);
}

.app-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.app-image.nature {
    background-image: url('https://images.unsplash.com/photo-1458966480358-a0ac42de0a7a');
}

.app-image.art {
    background-image: url('https://images.unsplash.com/photo-1579783902614-a3fb3927b6a5');
}

.app-image.algorithms {
    background-image: url('https://images.unsplash.com/photo-1558494949-ef010cbdcc31');
}

.app-content {
    padding: 1.5rem;
}

.app-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.app-content ul {
    list-style-position: inside;
    margin-top: 1rem;
}

.app-content li {
    margin-bottom: 0.5rem;
}

.tech-examples {
    margin-top: 2rem;
}

.tech-example {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.tech-example h3 {
    color: var(--primary-color);
}

pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

code {
    font-family: 'Courier New', monospace;
    color: #333;
}

/* API документация */
.api-docs {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.endpoint {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.endpoint:last-child {
    border-bottom: none;
}

.endpoint-details {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    gap: 1rem;
}

.endpoint-method {
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
    color: white;
}

.endpoint-method.get {
    background-color: #61affe;
}

.endpoint-path {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 3px;
}

.api-response {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    min-height: 50px;
}

/* Подвал */
footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

footer p {
    opacity: 0.8;
}

/* Адаптивность */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .facts-grid, .application-cards {
        grid-template-columns: 1fr;
    }
}