* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #1e293b;
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.logo span {
    color: #fbbf24;
}

.nav {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.nav a:hover {
    opacity: 0.8;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

/* Main content */
main {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

/* Calculator card */
.calculator-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #0f172a;
}

h2 {
    font-size: 24px;
    margin: 30px 0 15px;
    color: #1e293b;
}

h3 {
    font-size: 18px;
    margin: 20px 0 10px;
    color: #334155;
}

/* Form groups */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
}

input, select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: border-color 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Slider range */
input[type="range"] {
    padding: 0;
    -webkit-appearance: none;
    background: #e2e8f0;
    height: 6px;
    border-radius: 3px;
}

input[type="range"]:focus {
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
}

.range-value {
    margin-top: 8px;
    font-size: 14px;
    color: #3b82f6;
    font-weight: bold;
}

/* Grid for two columns */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(59,130,246,0.4);
}

.btn:active {
    transform: translateY(0);
}

/* Results block */
.results {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    padding: 25px;
    margin-top: 30px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.result-item {
    background: white;
    padding: 15px;
    border-radius: 16px;
    text-align: center;
}

.result-label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 5px;
}

.result-value {
    font-size: 28px;
    font-weight: bold;
    color: #0f172a;
}

.result-value small {
    font-size: 14px;
    font-weight: normal;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f8fafc;
    font-weight: 600;
}

/* Content text */
.content-text {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
}

.content-text p {
    margin-bottom: 15px;
}

.content-text ul, .content-text ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

/* Footer */
footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 30px 0;
    text-align: center;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    margin-left: 20px;
}

.footer-links a:hover {
    color: white;
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        padding: 15px 0;
    }

    .nav.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    h1 {
        font-size: 26px;
    }

    .calculator-card {
        padding: 20px;
    }

    .result-value {
        font-size: 22px;
    }

    .footer-inner {
        flex-direction: column;
    }

    .footer-links a {
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}