/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Контейнер */
body > * {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка и навигация */
header {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 0;
}

.nav-menu a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    background: #34495e;
    transform: translateY(-2px);
}

.nav-menu a.active {
    background: #3498db;
    font-weight: bold;
}

/* Основной контент */
main {
    padding: 2rem 0;
}

section {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

h3 {
    color: #34495e;
    margin: 1rem 0;
}

/* Карточки */
.features, .contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card, .contact-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease;
}

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

.status {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
}

.status.working {
    background: #d4edda;
    color: #155724;
}

.hash {
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

/* Таблица */
.server-info {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.server-info th, .server-info td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.server-info th {
    background: #f8f9fa;
    font-weight: bold;
}

.server-info tr:hover {
    background: #f8f9fa;
}

/* Форма */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

button {
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #2980b9;
}

/* Кнопки тестирования */
.test-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.test-btn {
    flex: 1;
    min-width: 200px;
}

.http-btn { background: #e74c3c; }
.http-btn:hover { background: #c0392b; }

.https-btn { background: #27ae60; }
.https-btn:hover { background: #219653; }

.cert-btn { background: #9b59b6; }
.cert-btn:hover { background: #8e44ad; }

/* Результаты тестов */
.test-results, .form-result {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    border-left: 4px solid #3498db;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
}

.success { color: #27ae60; }
.error { color: #e74c3c; }

/* Архитектура */
.architecture {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    font-family: monospace;
    white-space: pre-wrap;
    overflow-x: auto;
}

.commands {
    background: #2c3e50;
    color: white;
    padding: 1rem;
    border-radius: 4px;
    font-family: monospace;
}

.commands code {
    color: #3498db;
    margin-right: 0.5rem;
}

/* Подвал */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid #ddd;
    color: #7f8c8d;
}

footer a {
    color: #3498db;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .features, .contact-cards {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .test-buttons {
        flex-direction: column;
    }
}
