body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #333;
}

.input-section, .results-section, .chart-section {
    background-color: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 0;
}

.tab-button {
    background-color: #f5f5f5;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 5px;
    border-radius: 8px 8px 0 0;
    transition: background-color 0.3s;
    color: #666;
}

.tab-button:hover {
    background-color: #e0e0e0;
}

.tab-button.active {
    background-color: #4CAF50;
    color: white;
}

.tab-content {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 0 8px 8px 8px;
    min-height: 200px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.calculated-values {
    margin-top: 20px;
    padding: 15px;
    background-color: #e8f5e9;
    border-radius: 6px;
    border: 1px solid #c8e6c9;
}

.calculated-values h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2e7d32;
}

.calculated-values p {
    margin: 5px 0;
    color: #1b5e20;
}

.calculated-values span {
    font-weight: bold;
    color: #1b5e20;
}

small {
    font-size: 12px;
    color: #666;
}

label {
    display: inline-block;
    width: 200px;
    font-weight: bold;
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
    margin-right: 10px;
}

button:hover {
    background-color: #45a049;
}

#downloadCSV {
    background-color: #2196F3;
}

#downloadCSV:hover {
    background-color: #0b7dda;
}

#results {
    line-height: 1.6;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.result-card {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e0e0e0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.result-value {
    font-size: 28px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 5px;
}

.result-label {
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

.chart-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.chart-container {
    position: relative;
    height: 400px;
    flex: 1;
    min-width: 0;
}

#trajectoryChart {
    width: 100%;
    height: 100%;
    border: 1px solid #ddd;
}

.distance-table-container {
    flex-shrink: 0;
    overflow-x: auto;
}

.distance-table {
    border-collapse: collapse;
    font-size: 12px;
    background-color: white;
    border: 1px solid #ddd;
}

.distance-table th,
.distance-table td {
    padding: 6px 10px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.distance-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    position: sticky;
    top: 0;
}

.distance-table tbody tr:hover {
    background-color: #f9f9f9;
}

.distance-table td:first-child {
    font-weight: bold;
}

.footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    background-color: #f9f9f9;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

.github-link:hover {
    background-color: #333;
    color: white;
}

.github-icon {
    fill: currentColor;
}

/* Unit toggle switches */
.unit-toggle {
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
    font-size: 14px;
}

.unit-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    margin: 0 6px;
}

.unit-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.unit-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.unit-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .unit-slider {
    background-color: #4CAF50;
}

input:checked + .unit-slider:before {
    transform: translateX(16px);
}

.unit-label {
    color: #666;
    font-weight: normal;
}

.input-group {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.input-group > label {
    flex: 0 0 200px;
}

.input-group > input[type="number"],
.input-group > select {
    flex: 0 0 150px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    margin: 0;
}

.section-header .unit-toggle {
    margin-left: 0;
}

/* Tooltip styles */
.tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.tooltip.marker-tooltip {
    background: rgba(0, 102, 204, 0.9);
    border: 1px solid rgba(0, 153, 255, 0.8);
}