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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.4;
    color: #333;
    background: #f8f9fa;
}

.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.4rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.6rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
    transition: opacity 0.2s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #667eea;
        padding: 0.5rem;
        gap: 0.4rem;
    }
    .nav-menu.active { display: flex; }
}

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.2rem 1rem;
    text-align: center;
}

.hero h1 {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
}

.hero p {
    font-size: 0.95rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 0.6rem;
}

.btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: white;
    color: #667eea;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.6rem;
    margin: 0.75rem 0;
}

.feature-card {
    background: white;
    padding: 0.6rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
}

.feature-card h3 {
    color: #667eea;
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.feature-card p {
    font-size: 0.85rem;
}

.section {
    background: white;
    padding: 0.75rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 0.6rem;
}

.section h2 {
    color: #667eea;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.2rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.section h3 {
    color: #333;
    margin: 0.5rem 0 0.3rem;
    font-size: 1rem;
}

.section p {
    font-size: 0.9rem;
}

.formula {
    background: #f8f9fa;
    padding: 0.5rem;
    border-left: 3px solid #667eea;
    margin: 0.4rem 0;
    overflow-x: auto;
    font-size: 0.9rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.4rem 0;
    font-size: 0.85rem;
}

th, td {
    padding: 4px 6px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #667eea;
    color: white;
}

tr:hover {
    background: #f5f5f5;
}

pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 0.6rem;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
}

code {
    font-family: 'Fira Code', 'Consolas', monospace;
    background: #f0f0f0;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.85rem;
}

pre code {
    background: none;
    padding: 0;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
    padding: 0.3rem 0.6rem;
    border-radius: 4px 4px 0 0;
    margin-bottom: -4px;
}

.code-header span {
    color: #999;
    font-size: 0.75rem;
}

.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.7rem;
}

.copy-btn:hover {
    background: #5a6fd6;
}

.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 0.6rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.footer a {
    color: #667eea;
}

.highlight-green { color: #2ca02c; }
.highlight-red { color: #d62728; }

.example-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.5rem;
    margin: 0.4rem 0;
}

.example-box h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.4rem;
    margin: 0.5rem 0;
}

.nav-card {
    background: white;
    padding: 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.nav-card:hover {
    transform: translateY(-2px);
}

.nav-card h4 {
    color: #667eea;
    margin-bottom: 0.15rem;
    font-size: 0.9rem;
}

.nav-card p {
    font-size: 0.8rem;
    margin: 0;
}

ul {
    margin-left: 1.2rem;
    font-size: 0.9rem;
}

ul li {
    margin-bottom: 0.2rem;
}
