/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Шапка */
header {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    padding: 30px 40px;
    text-align: center;
}

header h1 {
    margin-bottom: 20px;
    font-size: 2.5rem;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-top: 20px;
}

nav li {
    margin: 0 15px;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

nav a:hover, nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Основной контент */
main {
    padding: 40px;
}

.hero {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background-color: #f0f7ff;
    border-radius: 10px;
}

.hero h2 {
    color: #1a73e8;
    margin-bottom: 15px;
    font-size: 2rem;
}

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

.card {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card h3 {
    color: #1a73e8;
    margin-bottom: 15px;
    border-bottom: 2px solid #1a73e8;
    padding-bottom: 10px;
}

.card ul, .card ol {
    padding-left: 20px;
}

.card li {
    margin-bottom: 8px;
}

pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Галерея изображений */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.image-item {
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
}

.image-item:hover {
    transform: scale(1.03);
}

.image-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.image-item p {
    padding: 15px;
    background-color: #f9f9f9;
}

/* Таблицы */
.test-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.test-table th {
    background-color: #1a73e8;
    color: white;
}

.test-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.test-table tr:hover {
    background-color: #f0f7ff;
}

/* API тестирование */
.api-test, .api-section {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    margin: 30px 0;
}

.api-test h3, .api-section h3 {
    margin-bottom: 20px;
    color: #1a73e8;
}

.api-buttons, .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

button {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    background-color: #0d47a1;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.result, .result-full {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
    margin-top: 20px;
    min-height: 100px;
    overflow-x: auto;
}

.result-full {
    max-height: 400px;
    overflow-y: auto;
}

/* Формы */
.api-test-form {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: monospace;
    resize: vertical;
}

/* Информация о производительности */
.performance-info {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    border: 1px solid #e0e0e0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background-color: #f0f7ff;
    border-radius: 10px;
}

.stat-item h4 {
    color: #1a73e8;
    margin-bottom: 10px;
    font-size: 1rem;
}

.stat-item p {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

/* Динамический контент */
.dynamic-content {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    border: 1px solid #e0e0e0;
}

#dynamic-content-area {
    margin-top: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    max-height: 500px;
    overflow-y: auto;
}

.generated-content ul {
    columns: 2;
    column-gap: 40px;
}

.generated-content li {
    margin-bottom: 5px;
    padding: 5px 0;
    border-bottom: 1px dashed #ddd;
}

.gen-time {
    font-style: italic;
    color: #666;
    margin-top: 15px;
    text-align: right;
}

/* Подвал */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 25px;
    margin-top: 40px;
}

/* Адаптивность */
@media (max-width: 768px) {
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav li {
        margin: 5px 0;
    }
    
    .content {
        grid-template-columns: 1fr;
    }
    
    .api-buttons, .button-group {
        flex-direction: column;
    }
    
    .generated-content ul {
        columns: 1;
    }
}
