/* General Styles */
body {
    font-family: Arial, sans-serif;
    background: #f0f0f0;
    color: white;
    padding: 20px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Header Styles */
#site-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin-bottom: 10px;
    width: 100%;
}

.logo {
    max-width: 250px;
    margin: 0px;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5));
}

.fancy-text {
    font-size: 2.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #4a90e2, #6bb3ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
    margin: 10px 0 5px;
    padding: 8px 16px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(74, 144, 226, 0.2);
}

/* Navigation Menu Styles */
nav {
    width: 100%;
    background-color: white;
    padding: 20px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 10px;    
    box-sizing: border-box;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 800px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.nav-menu li {
    display: inline;
}

.nav-menu a {
    color: #007BFF;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    background: white;
    border: 2px solid #007BFF;
    transition: all 0.3s;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #0056b3;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Tool Container Styles (Homepage) */
.tools-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.tool-button {
    padding: 15px 25px;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    display: inline-block;
}

.tool-button:hover {
    background: #0056b3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}        

/* Description Box Styles */
.description {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    padding: 15px;
    margin-top: 20px;
    width: 90%;
    max-width: 800px;
    text-align: center;
    font-size: 1rem;
    color: white;
}

/* Main Section Box (Container) Styles */
.container {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    padding: 20px;
    margin-top: 20px;
    width: 90%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container h3 {
    margin: 5px 0;
}

/* File Upload Styles */
#uploadForm {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

input[type="file"] {
    width: 250px;
    max-width: 100%;
}

#uploadStatus, #rotorflightVersion, #nameLine {
    text-align: center;
}

/* Rate Input Styles */
.rate-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

.rate-input-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.rate-input-box label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-align: center;
    width: 100%;
}

.rate-input-box input,
.rate-input-box select {
    padding: 12px;
    font-size: 1rem;
    width: 100%;
    max-width: 250px;
    box-sizing: border-box;
}

.rate-input-box select {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #ccc;
    border-radius: 5px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

/* Generic Button Styles */
button {
    background: white;
    border: 2px solid #007BFF;
    color: #007BFF;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    text-align: center;
    display: inline-block;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
    background: #0056b3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    margin: 0 5px;
}

input[type="checkbox"]:checked {
    background-color: #007bff;
    border-color: #007bff;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M20.285 6.414l-1.824-1.824-9.96 9.96-4.47-4.47-1.824 1.824 6.294 6.294z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

/* Apply Button Styles */
.apply-btn {
    margin-top: 20px !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Profile Section Styles */
.profile-checkboxes {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.profile-checkboxes label {
    display: block;
    text-align: center;
    margin: 20px 15px 0 0;
}

.profile-checkbox {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.profile-checkbox label {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 0.9rem;
    gap: 5px;
    margin-right: 25px;
}

.profile-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
}

/* Telemetry Styles */
.telem-container {
    width: 100%;
    align-items: flex-start;
}

.telem-preset {
    display: inline;
    margin: 10px 0;
}

.telem-options {
    display: inline-grid;
    margin: 10px 0;
    gap: 5px;
}

.telem-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
    margin-left: 20px;
    margin-right: 20px;
    flex-wrap: wrap;
}

.telem-flex-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

#telem-sensor-groups {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
}

.telem-category {
    flex: 1 1 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.telem-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.telem-select-all {
    cursor: pointer;
}

.telem-sensor-list {
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.telem-sensor-label {
    display: flex;
    align-items: center;
    margin: 3px 0;
    font-size: 14px;
    width: 100%;
}

/* Download Button Styles */
.download-btn {
    background: white;
    border: 2px solid #007BFF;
    color: #007BFF;
    padding: 12px 20px;
    margin-top: 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 300px;
    cursor: pointer;
    transition: all 0.3s;
}

.download-btn:hover {
    background: #0056b3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Custom File Input Styles */
.file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.file-input-hidden {
    display: none;
}

.file-input-button {
    background: white;
    border: 2px solid #007BFF;
    color: #007BFF;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-input-button:hover {
    background: #0056b3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.file-name {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* Custom Select Dropdown Styles */
.telem-settings select,
#receiver-protocol,
#telem-preset {
    background: white !important;
    border: 2px solid #007BFF !important;
    color: #007BFF !important;
    padding: 8px 16px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    transition: all 0.3s !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23007BFF' viewBox='0 0 16 16'%3e%3cpath d='m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 12px !important;
    padding-right: 32px !important;
    width: auto !important;
    max-width: none !important;
}

.telem-settings select:hover,
.telem-settings select:focus,
#receiver-protocol:hover,
#receiver-protocol:focus,
#telem-preset:hover,
#telem-preset:focus {
    background-color: #0056b3 !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4) !important;
    outline: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 16 16'%3e%3cpath d='m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z'/%3e%3c/svg%3e") !important;
}

/* Custom Radio Button Styles */
.radio-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.radio-option {
    position: relative;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-option label {
    background: white;
    border: 2px solid #007BFF;
    color: #007BFF;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.radio-option input[type="radio"]:checked + label {
    background: #0056b3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.radio-option label:hover {
    background: #0056b3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Notification Message Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.notification.error {
    background: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}
/* Footer Styles */
#site-footer {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 0.9rem;
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
    text-align: left;
}

.footer-container h3 {
    margin-bottom: 2px;
    font-size: 0.8rem;
}

/* Responsive Styles */
@media (max-width: 599px) {
    nav {
        padding: 10px;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 10px;
        padding: 0;
    }
    
    .nav-menu li {
        display: block;
        margin: 0;
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        width: 100%;
        padding: 12px 15px;
        text-align: center;
        border-radius: 8px;
        background: rgba(0, 123, 255, 0.05);
        box-sizing: border-box;
    }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        background: rgba(0, 123, 255, 0.15);
    }
    
    .rate-inputs {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .rate-input-box {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .rate-input-box input,
    .rate-input-box select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Give mode buttons the same padding treatment */
    .mode-selector {
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .mode-btn {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Add padding wrapper for buttons */
    .container > button,
    .container > .download-btn {
        margin-left: 0;
        margin-right: 0;
        width: calc(100% - 30px);
        align-self: center;
    }
    
    .telem-category {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    /* Ensure all containers account for padding */
    .container {
        box-sizing: border-box;
    }
}
        
/* Mode Selector */
.mode-selector {
    display: flex;  
    gap: 20px;
    margin-top: 10px;
    padding: 0;
    justify-content: stretch;
    flex-wrap: wrap;
    width: calc(100% - 10px);
}

.mode-btn {
    padding: 15px 15px;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 250px;
    max-width: none;
}

.mode-btn.active {
    background: #0056b3;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.mode-btn:hover {
    background: #0056b3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Calculator Results */
.calc-result-item {
    padding: 10px;
    margin: 5px 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid #007bff;
    color: white;
}

.calc-result-item.warning {
    border-left-color: #ffc107;
    background: rgba(255, 193, 7, 0.2);
}

.calc-result-item.error {
    border-left-color: #dc3545;
    background: rgba(220, 53, 69, 0.2);
}

.calc-result-item.success {
    border-left-color: #28a745;
    background: rgba(40, 167, 69, 0.2);
}

/* Charts Styles */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
}

.chart-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.chart-item canvas {
    width: 100% !important;
    height: 400px !important;
    display: block;
}

.pinion-performance-container {
    margin-top: 20px;
}

.pinion-performance-container h3 {
    text-align: center;
    margin-bottom: 20px;
    color: white;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Responsive Design for Calculator */
@media (max-width: 768px) {
    .mode-selector {
        flex-direction: column;
    }
    
    .mode-btn {
        margin-bottom: 5px;
        width: 100%;
    }
    
    .container {
        padding: 10px 5px;
        width: 98%;
    }
    
    .chart-item {
        padding: 10px 5px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .chart-item canvas {
        height: 280px !important;
    }
    
    .chart-item h4 {
        font-size: 0.8rem;
        margin: 5px 0;
        padding: 0 5px;
    }
    
    .charts-grid {
        gap: 10px;
    }
    
    .description {
        font-size: 0.9rem;
        padding: 12px;
    }
}