:root {
    --gonio-primary: #059669;
    --gonio-secondary: #34d399;
    --accent: #f59e0b;
    --whale-blue: #0f172a;
    --sage-light: #f0fdf4;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background: #f8fafc;
    font-family: 'Outfit', sans-serif;
    color: var(--whale-blue);
}

header {
    background: linear-gradient(135deg, var(--gonio-primary) 0%, var(--gonio-secondary) 100%);
    padding: 3rem 2rem;
    color: white;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.back-home {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.container {
    max-width: 1000px;
    margin: -3rem auto 4rem;
    padding: 0 1rem;
}

.topics-nav {
    display: flex;
    gap: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 3rem;
    justify-content: center;
}

.topic-link {
    padding: 1rem 2rem;
    cursor: pointer;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.topic-link:hover { background: var(--sage-light); }
.topic-link.active { background: var(--gonio-primary); color: white; }

.gonio-section { display: none; }
.gonio-section.active { display: block; animation: fadeIn 0.8s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.section-title { margin-bottom: 2rem; font-size: 2rem; font-weight: 800; color: var(--gonio-primary); }

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

.info-card {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
}

.highlight { color: var(--gonio-primary); font-weight: 800; }

.formula-box {
    background: var(--sage-light);
    padding: 1.5rem;
    border-radius: 16px;
    margin: 1.5rem 0;
    border-left: 5px solid var(--gonio-primary);
}

.trig-viz {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.gonio-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.gonio-table th {
    background: var(--gonio-primary);
    color: white;
    padding: 1rem;
    text-align: center;
}

.gonio-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.main-footer { text-align: center; padding: 4rem 0; background: #fff; margin-top: 4rem; }
.footer-magic { font-size: 1.5rem; color: var(--gonio-primary); font-weight: 600; }
