/* Основные стили для всех страниц */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.8;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    background-color: #f9f9f9;
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5em;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

h2 {
    color: #2980b9;
    margin-top: 35px;
    font-size: 1.8em;
}

.infographic {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.salary-chart {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    flex-wrap: wrap;
}

.salary-box {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 20px;
    border-radius: 8px;
    width: 28%;
    min-width: 250px;
    margin: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Дополнительные стили для инфографики */
.skill-meter {
    background-color: #ecf0f1;
    border-radius: 5px;
    margin: 20px 0;
    overflow: hidden;
}

.skill-bar {
    height: 30px;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    display: flex;
    align-items: center;
    padding-left: 15px;
    color: white;
    font-weight: bold;
    transition: width 0.5s ease;
}

.trend-card {
    background: white;
    border-left: 5px solid #e74c3c;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    body {
        padding: 20px;
    }
    .salary-box {
        width: 100%;
    }
}

/* Добавьте в конец styles.css */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.tech-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.db-comparison {
    display: flex;
    justify-content: space-around;
    text-align: left;
}

.db-comparison > div {
    width: 45%;
    padding: 15px;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
}

/* Добавьте в конец styles.css */
.comparison-table {
    overflow-x: auto;
    margin: 30px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

th {
    background-color: #3498db;
    color: white;
    font-weight: 500;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e8f4fc;
}

.legend {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
}

.color-box {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 8px;
    border-radius: 3px;
}

.threat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.threat-card {
    padding: 20px;
    border-radius: 8px;
    color: white;
}

.threat-card.critical {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

.threat-card.high {
    background: linear-gradient(135deg, #f46b45, #eea849);
}

.protocol-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 25px;
}

.protocol-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.protocol-card li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 30px;
}

.protocol-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #2ecc71;
    font-weight: bold;
}

@media (max-width: 768px) {
    .protocol-comparison {
        grid-template-columns: 1fr;
    }
}

/* Протоколы */
.protocol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.protocol-card {
    padding: 25px;
    border-radius: 10px;
    color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.protocol-card.http3 {
    background: linear-gradient(135deg, #6e48aa, #9d50bb);
}

.protocol-card.websocket {
    background: linear-gradient(135deg, #4776E6, #8E54E9);
}

/* Форматы данных */
.format-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.format-card {
    padding: 20px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.format-card.binary {
    border-top: 5px solid #4b6cb7;
}

.format-card.text {
    border-top: 5px solid #00b09b;
}

/* Тренды */
.trend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.trend-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.meter {
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    margin-top: 10px;
}

.meter span {
    display: block;
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #4b6cb7, #182848);
    color: white;
    text-align: right;
    padding-right: 10px;
    font-size: 12px;
    line-height: 20px;
}

/* Edge-вычисления */
.edge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.edge-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border-top: 4px solid #6a11cb;
}

.edge-card:nth-child(2) {
    border-top-color: #2575fc;
}

/* AI-инструменты */
.ai-tools {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.tool-card {
    width: 250px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

.tool-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.adoption {
    margin-top: 15px;
    padding: 8px;
    background: #e3f2fd;
    border-radius: 20px;
    color: #1976d2;
    font-weight: bold;
}

/* Web3 */
.web3-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 25px 0;
}

.tech-pill {
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: bold;
}

.trend-card.web3 {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
}

/* Пирамида навыков */
.skills-pyramid {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
}

.layer {
    width: 80%;
    padding: 25px;
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.layer.essential {
    background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
    width: 100%;
}

.layer.intermediate {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    width: 70%;
}

.layer.advanced {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    width: 40%;
}

/* Перспективные технологии */
.emerging-tech {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.tech-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.tech-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
}

.tech-card.ai::after { background: #6a11cb; }
.tech-card.web3::after { background: #2575fc; }
.tech-card.edge::after { background: #00b09b; }

.heat {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
}

.heat::before {
    content: '';
    display: block;
    height: 100%;
    width: var(--heat);
    background: linear-gradient(90deg, #ff758c, #ff7eb3);
    border-radius: 4px;
}
