body {
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
    min-height: 100vh;
    color: #ffffff;
}

.page-wrapper {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #ffffff, rgba(0,0,0,0));
    background-repeat: repeat;
    animation: stars 15s linear infinite;
    opacity: 0.3;
}

@keyframes stars {
    from { transform: translateY(0); }
    to { transform: translateY(-100vh); }
}

.main-container {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

h1 {
    color: #ffffff;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.toggle-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.toggle-container.three-buttons {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.toggle-btn {
    flex: 1;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 25px;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
}

.toggle-btn:hover {
    background: rgba(255,255,255,0.2);
}

.toggle-btn.active {
    background: #007bff;
    box-shadow: 0 0 15px rgba(0,123,255,0.5);
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.form-container[style*="display: none"] {
    opacity: 0;
}

.card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ffffff;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background: rgba(255,255,255,0.15);
    border-color: #007bff;
    box-shadow: 0 0 0 0.25rem rgba(0,123,255,0.25);
    color: #ffffff;
}

.form-select {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff; 
}

.form-select:focus {
    background: rgba(255, 255, 255, 0.25);
}

.form-select option {
    background: rgba(0, 123, 255, 0.1); 
    color: #ffffff; 
}

.form-select:focus option {
    background: rgba(52, 53, 53, 0.955); 
    color: #ffffff; 
}

.form-select.open {
    background: rgba(0, 123, 255, 0.3); 
    color: #ffffff; 
}

.form-select.open option:hover {
    background: rgba(0, 123, 255, 0.5); 
}


.pulse {
    position: relative;
    overflow: hidden;
}

.pulse:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out;
}

.pulse:hover:before {
    width: 200px;
    height: 200px;
    opacity: 0;
}

.result-container {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.result-container pre {
    color: #ffffff;
    background: transparent;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.eoq-metrics {
    margin-top: 2rem;
}

.eoq-metrics .metric {
    background: rgba(255,255,255,0.08);
    padding: 1.5rem;
    border-radius: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.eoq-metrics .metric:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.12);
}

.eoq-metrics .metric h5 {
    color: #007bff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.eoq-metrics .metric p {
    font-size: 1.4rem;
    margin: 0;
    color: #ffffff;
    font-weight: 500;
}

.parameters {
    background: rgba(0,123,255,0.1);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.parameters h5 {
    color: #007bff;
    margin-bottom: 1rem;
}

.parameters ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.parameters li {
    padding: 0.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .toggle-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toggle-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .parameters ul {
        grid-template-columns: 1fr;
    }
}
