:root {
    --primary-color: #2c5aa0;
    --secondary-color: #5c9fd6;
    --danger-color: #d9534f;
    --success-color: #5cb85c;
    --dark-bg: #1a1a2e;
    --light-bg: #f5f7fa;
    --border-color: #e1e8ed;
    --text-color: #333;
    --text-light: #666;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

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

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 2rem 0;
    box-shadow: var(--shadow);
}

.site-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.site-header h1 a {
    color: var(--white);
    text-decoration: none;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
}

.breadcrumb {
    margin-top: 1rem;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.breadcrumb a:hover {
    opacity: 1;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

/* Search Section */
.search-section {
    margin: 2rem 0;
}

.search-form {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-button {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.search-button:hover {
    background: var(--secondary-color);
}

.clear-search {
    padding: 1rem;
    background: var(--danger-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    transition: opacity 0.3s;
}

.clear-search:hover {
    opacity: 0.9;
}

/* Breaches Section */
.breaches-section {
    margin: 3rem 0;
}

.breaches-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-bg);
}

.table-responsive {
    overflow-x: auto;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.breaches-table {
    width: 100%;
    border-collapse: collapse;
}

.breaches-table thead {
    background: var(--dark-bg);
    color: var(--white);
}

.breaches-table th {
    padding: 1.2rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.breaches-table td {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-color);
}

.breaches-table tbody tr {
    transition: background-color 0.3s;
}

.breaches-table tbody tr:hover {
    background-color: rgba(92, 159, 214, 0.05);
}

.breach-name {
    font-weight: 600;
}

.breach-emoji {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.breach-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.breach-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.pwn-count {
    font-size: 1.2rem;
}

.pwn-count strong {
    color: var(--danger-color);
}

.metrics-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.metric-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--light-bg);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-color);
}

.metric-more {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: italic;
}

.details-button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
}

.details-button:hover {
    background: var(--secondary-color);
    transform: translateX(5px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 8px;
}

.pagination-link {
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.pagination-link:hover {
    background: var(--secondary-color);
}

.pagination-info {
    font-weight: 500;
    color: var(--text-light);
}

/* Breach Detail Page */
.breach-detail {
    background: var(--white);
    border-radius: 12px;
    padding: 3rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.breach-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.breach-title {
    font-size: 2.5rem;
    color: var(--dark-bg);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.breach-emoji-large {
    font-size: 3rem;
}

.breach-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    color: var(--text-light);
}

.meta-item {
    font-size: 1rem;
}

.meta-item strong {
    color: var(--danger-color);
    font-size: 1.3rem;
}

.breach-description {
    margin: 2rem 0;
}

.breach-description h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--dark-bg);
}

.description-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.breach-metrics {
    margin: 3rem 0;
}

.breach-metrics h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--dark-bg);
}

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

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.metric-icon {
    font-size: 2.5rem;
}

.metric-info {
    flex: 1;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.breach-info-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.info-box {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.info-box h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark-bg);
}

.info-box ul {
    list-style-position: inside;
    line-height: 2;
}

.data-classes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.data-class-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--white);
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

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

.api-section h3 {
    margin-bottom: 1rem;
}

.api-code {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-top: 1rem;
}

.api-code code {
    color: #5cb85c;
    font-family: 'Courier New', monospace;
}

.breach-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--text-light);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: var(--dark-bg);
}

/* Footer */
.site-footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.site-footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

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

.no-results {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .site-header h1 {
        font-size: 1.8rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .breaches-table {
        font-size: 0.9rem;
    }
    
    .breaches-table th,
    .breaches-table td {
        padding: 0.8rem;
    }
    
    .breach-title {
        font-size: 1.8rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .breach-detail {
        padding: 1.5rem;
    }
}

/* Print styles */
@media print {
    .search-section,
    .pagination,
    .breach-navigation,
    .site-footer {
        display: none;
    }
}

/* Добавь это в конец существующего CSS файла */

.metric-percentage {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

.metrics-summary {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.metrics-summary p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.metrics-summary strong {
    color: var(--primary-color);
}

.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page h1 {
    font-size: 3rem;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.error-page p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

/* Третья карточка статистики */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}