:root {
    --bg-color: #F5F5F5;
    --panel-color: #E0E0E0;
    --text-color: #222222;
    --primary-color: #4A90E2;
    --accent-color: #FF9500;
    --input-bg: #f9f9f9;
    --input-border: #333;
    --error-color: #e74c3c;
    --success-color: #27ae60;
}

.colorblind-mode {
    --primary-color: #222222;
    --accent-color: #444444;
}

.clac360-free-fall-calculator * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.clac360-free-fall-calculator {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.clac360-free-fall-calculator .app-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .clac360-free-fall-calculator .app-container {
        grid-template-columns: 1fr;
    }
}

.clac360-free-fall-calculator .panel {
    background-color: var(--panel-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.clac360-free-fall-calculator .panel-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.clac360-free-fall-calculator .colorblind-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.clac360-free-fall-calculator .toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.clac360-free-fall-calculator .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.clac360-free-fall-calculator .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

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

.clac360-free-fall-calculator input:checked + .slider {
    background-color: var(--primary-color);
}

.clac360-free-fall-calculator input:checked + .slider:before {
    transform: translateX(26px);
}

.clac360-free-fall-calculator .input-group {
    margin-bottom: 15px;
}

.clac360-free-fall-calculator label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.clac360-free-fall-calculator input, 
.clac360-free-fall-calculator select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--input-border);
    border-radius: 4px;
    background-color: var(--input-bg);
    font-size: 1rem;
    transition: all 0.2s;
}

.clac360-free-fall-calculator input:focus, 
.clac360-free-fall-calculator select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.clac360-free-fall-calculator .form-section {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #ccc;
}

.clac360-free-fall-calculator .form-section-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
}

.clac360-free-fall-calculator .button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.clac360-free-fall-calculator button {
    padding: 12px 18px;
    border: none;
    border-radius: 6px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.clac360-free-fall-calculator button:hover {
    background-color: #3a7bc8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.clac360-free-fall-calculator button:active {
    transform: translateY(0);
}

.clac360-free-fall-calculator button.secondary {
    background-color: var(--accent-color);
}

.clac360-free-fall-calculator button.secondary:hover {
    background-color: #e08500;
}

.clac360-free-fall-calculator button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.clac360-free-fall-calculator .error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 5px;
    padding: 8px;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 4px;
    border-left: 3px solid var(--error-color);
}

.clac360-free-fall-calculator .success-message {
    color: var(--success-color);
    font-size: 0.9rem;
    margin-top: 5px;
    padding: 8px;
    background-color: rgba(39, 174, 96, 0.1);
    border-radius: 4px;
    border-left: 3px solid var(--success-color);
}

.clac360-free-fall-calculator .results-section {
    margin-top: 30px;
}

.clac360-free-fall-calculator .result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.clac360-free-fall-calculator .result-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s;
}

.clac360-free-fall-calculator .result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.clac360-free-fall-calculator .result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 10px 0 5px;
}

.clac360-free-fall-calculator .result-label {
    font-weight: 500;
    color: var(--text-color);
    opacity: 0.8;
}

.clac360-free-fall-calculator .result-unit {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
}

.clac360-free-fall-calculator .charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1024px) {
    .clac360-free-fall-calculator .charts-container {
        grid-template-columns: 1fr;
    }
}

.clac360-free-fall-calculator .chart-wrapper {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.clac360-free-fall-calculator .chart-wrapper:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.clac360-free-fall-calculator .chart-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
}

.clac360-free-fall-calculator canvas {
    width: 100%;
    height: 280px;
}

.clac360-free-fall-calculator .trademark {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.7;
}

.clac360-free-fall-calculator .hidden {
    display: none;
}

.clac360-free-fall-calculator .loading {
    text-align: center;
    padding: 30px;
}

.clac360-free-fall-calculator .spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.clac360-free-fall-calculator .csv-import-section {
    margin-top: 20px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.clac360-free-fall-calculator .step-log {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    line-height: 1.4;
}

.clac360-free-fall-calculator .metadata {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.clac360-free-fall-calculator .metadata-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.clac360-free-fall-calculator .solver-badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 8px;
}

.clac360-free-fall-calculator .impact-highlight {
    background-color: rgba(255, 149, 0, 0.2);
    border-left: 3px solid var(--accent-color);
    padding: 5px 10px;
    border-radius: 4px;
    margin: 5px 0;
}

.clac360-free-fall-calculator .dynamic-section {
    margin-top: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.clac360-free-fall-calculator .dynamic-section-content {
    margin-top: 10px;
    line-height: 1.6;
}

.clac360-free-fall-calculator .dynamic-item {
    margin-bottom: 10px;
    padding: 8px;
    border-left: 3px solid var(--primary-color);
    background-color: rgba(74, 144, 226, 0.05);
    border-radius: 0 4px 4px 0;
}

.clac360-free-fall-calculator .dynamic-item.warning {
    border-left-color: var(--accent-color);
    background-color: rgba(255, 149, 0, 0.05);
}

.clac360-free-fall-calculator .dynamic-item.success {
    border-left-color: var(--success-color);
    background-color: rgba(39, 174, 96, 0.05);
}

.clac360-free-fall-calculator .dynamic-item.error {
    border-left-color: var(--error-color);
    background-color: rgba(231, 76, 60, 0.05);
}

.clac360-free-fall-calculator .dynamic-item-title {
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.clac360-free-fall-calculator .dynamic-item-title::before {
    content: "•";
    margin-right: 8px;
    font-size: 1.2rem;
}

.clac360-free-fall-calculator .dynamic-item.warning .dynamic-item-title::before {
    color: var(--accent-color);
}

.clac360-free-fall-calculator .dynamic-item.success .dynamic-item-title::before {
    color: var(--success-color);
}

.clac360-free-fall-calculator .dynamic-item.error .dynamic-item-title::before {
    color: var(--error-color);
}