:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --accent-color: #27ae60;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    /* For watermark positioning */
}

/* Watermark Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('watermark.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 900px;
    /* Adjust size of the logo */
    opacity: 0.08;
    /* Very subtle */
    pointer-events: none;
    /* Allow clicking through */
    z-index: 9999;
    /* On top of everything */
}

.container {
    width: 90%;
    max-width: 1500px;
    margin: 2rem auto;
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}

header h1 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background-color: #e0e0e0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    transition: all 0.3s ease;
    width: auto;
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(74, 144, 226, 0.4);
}

.tab-btn:hover:not(.active) {
    background-color: #d0d0d0;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* 2fr Left, 1fr Right */
    background-color: #f9f9f9;
    gap: 2rem;
}

.input-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2fr Left, 1fr Right */
    gap: 2rem;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.controls-panel {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: var(--border-radius);

}

.input-group,
.calculation-group {
    margin-bottom: 2rem;
}

h3 {
    color: var(--secondary-color);
    margin-top: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

h4 {
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.info-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.point-input,
.calc-input {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.point-input label,
.calc-input label {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

input[type="number"] {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: bold;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: #357abd;
}

.secondary-btn {
    background-color: var(--accent-color);
    color: white;
    margin-top: 1rem;
}

.secondary-btn:hover {
    background-color: #219150;
}

.result-hidden {
    display: none;
}

#resultArea,
#bethesdaResultArea,
#b_f8ResultArea {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #e8f5e9;
    border-radius: 4px;
    border-left: 5px solid var(--accent-color);
}

#resultArea h4,
#bethesdaResultArea h4 {
    margin: 0 0 0.5rem 0;
    color: var(--secondary-color);
}

#resultValue,
#buValue,
#residualValue,
#finalResultValue {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

#parallelismValue {
    font-weight: bold;
}

.graph-panel {
    background-color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid #eee;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

canvas {
    width: 80% !important;
    height: auto !important;
}