:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 16px;
    --shadow: 0 4px 20px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text);
}
.logo span { color: var(--primary); }

nav a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
}
nav a:hover { color: var(--primary); }

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 40px 0;
}

.hero-text h1 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 15px;
}
.hero-text h1 span { color: var(--primary); }

.trust-badges {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.trust-badges span {
    background: #e0e7ff;
    color: #3730a3;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
}

/* Calculator */
.calculator {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.calc-group {
    margin-bottom: 25px;
}
.calc-group label {
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.range-limits {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    margin-top: 5px;
}

.calc-result {
    display: flex;
    justify-content: space-between;
    background: var(--bg);
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
}
.calc-result div {
    text-align: center;
}
.calc-result span {
    display: block;
    font-size: 13px;
    color: var(--muted);
}
.calc-result strong {
    font-size: 24px;
    color: var(--primary);
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-primary:hover { background: var(--primary-hover); }

/* Quick Search */
.quick-search { padding: 30px 0; }
.quick-search h2 { margin-bottom: 15px; }

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}
.tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.tag.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Sort Panel */
.sort-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin: 40px 0 20px;
}

.sort-buttons {
    display: flex;
    gap: 10px;
}
.sort-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--muted);
}
.sort-btn.active {
    background: #e0e7ff;
    color: var(--primary);
}

/* Cards */
.mfo-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mfo-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 25px;
    display: grid;
    grid-template-columns: 120px 1fr 1fr 220px;
    gap: 20px;
    align-items: start;
    transition: 0.3s;
    position: relative;
}
.mfo-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.mfo-badge {
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--warning);
    color: #1e293b;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
}

.mfo-logo {
    width: 100%;
    height: 80px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: bold;
    color: #cbd5e1;
}
.mfo-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.mfo-info h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.mfo-features {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.mfo-features span {
    background: #e0e7ff;
    color: #3730a3;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.mfo-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.approval-scale {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
}
.approval-bar {
    height: 100%;
    background: var(--success);
    border-radius: 10px;
}
.approval-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
}

.mfo-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.mfo-rate {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}
.mfo-rate small { font-size: 14px; font-weight: 400; color: var(--muted); }

.go-btn {
    display: block;
    background: var(--primary);
    color: white;
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.2s;
}
.go-btn:hover { background: var(--primary-hover); }

/* Details Tabs */
.details-tabs {
    grid-column: 2 / 5;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

.tab-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}
.tab-btn.active {
    background: var(--primary);
    color: white;
}

.tab-content {
    display: none;
    width: 100%;
    font-size: 14px;
    color: var(--muted);
    margin-top: 10px;
}
.tab-content.show {
    display: block;
    animation: fadeIn 0.3s;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* SEO Text */
.seo-text {
    margin: 60px 0;
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.seo-text h2, .seo-text h3 {
    margin-bottom: 15px;
    color: var(--text);
}
.seo-text p {
    margin-bottom: 20px;
    color: #475569;
}

footer {
    background: #1e293b;
    color: #94a3b8;
    text-align: center;
    padding: 30px;
    margin-top: 40px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 20px 0;
    }
    .hero-text h1 { font-size: 32px; }

    .mfo-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .mfo-logo {
        width: 120px;
        margin: 0 auto;
    }
    .mfo-stats { align-items: center; }
    .details-tabs {
        grid-column: 1;
        justify-content: center;
    }
    .sort-panel {
        flex-direction: column;
        gap: 15px;
        align-items: start;
    }
    nav a { display: none; }
}