:root {
    --bg-color: #121212;
    --primary-color: #8ab4f8;
    --secondary-color: #c58af9;
    --text-color: #e0e0e0;
    --text-muted-color: #888;
    --border-color: rgba(255, 255, 255, 0.1);
    --button-bg-color: #333;
    --button-text-color: #e0e0e0;
}

html.light-theme {
    --bg-color: #ffffff;
    --primary-color: #323131;
    --secondary-color: #323131;
    --text-color: #323131;
    --text-muted-color: #555555;
    --border-color: rgba(0, 0, 0, 0.1);
    --button-bg-color: #f0f0f0;
    --button-text-color: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
}

p {
    font-size: 16px;
    margin-bottom: 15px; 
}

h1 { font-size: 32px; margin-bottom: 20px; }
h2 { font-size: 28px; margin-bottom: 18px; }
h3 { font-size: 26px; margin-bottom: 16px; }
h4 { font-size: 24px; margin-bottom: 14px; }

ul, ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 8px;
    line-height: 1.6;
}


.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}


.main-content-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 10px;
    gap: 50px; 
    align-items: flex-start;
    flex-grow: 1;
}

.calculator-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 30px; 
    padding: 40px 0;
}

.sidebar {
    width: 350px;
    flex-shrink: 0;
    padding: 20px 0;
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background: transparent;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 30px; 
}

.sidebar-widget h3 {
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--primary-color);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}



.sidebar-widget ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    text-decoration: none;
    color: var(--text-muted-color);
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
    font-weight: 400;
}

.sidebar-widget ul li a:hover {
    background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: var(--text-color);
}

.sidebar-widget ul li a.active {
    background-color: color-mix(in srgb, var(--primary-color) 20%, transparent);
    color: var(--primary-color);
    font-weight: 500;
}


.arrow-icon {
    font-size: 1.4rem;
    color: var(--text-muted-color);
    transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar-widget ul li a:hover .arrow-icon {
    transform: translateX(5px);
    color: var(--primary-color);
}


.terms-content h1,
.terms-content h2,
.terms-content h3,
.terms-content h4 {
    margin-top: 25px;
    margin-bottom: 15px;
}


.terms-content p {
    margin-bottom: 15px;
    font-size: 16px;
}


.terms-content ul, 
.terms-content ol {
    padding-left: 25px;
    margin-bottom: 20px;
}

@media (max-width: 1200px) {
    .main-content-wrapper {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        position: static;
        padding-top: 0;
    }
    .calculator-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
    h3 { font-size: 22px; }
    h4 { font-size: 20px; }

    .main-content-wrapper {
        padding: 0 10px;
    }

    .sidebar-widget ul {
        padding-left: 15px;
    }
}
