/* Основные стили */
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e1e1e, #000000);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #ffffff;
    flex-direction: column;
}

.container {
    width: 90%;
    max-width: 600px;
    background: rgba(30, 30, 30, 0.9);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    border-top: 8px solid #fec114;
    backdrop-filter: blur(10px);
}

h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #fec114;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: left;
    color: #ffffff;
}

select, input, button {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #555;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(51, 51, 51, 0.8);
    color: #ffffff;
}

select:focus, input:focus {
    border-color: #fec114;
    outline: none;
    box-shadow: 0 0 8px rgba(254, 193, 20, 0.7);
}

button {
    background: linear-gradient(135deg, #fec114, #e0ab10);
    color: #000000;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Исключение для кнопки "Рассчитать" */
#calculate-button {
    background-color: #ffcc00 !important;
    color: black !important;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(254, 193, 20, 0.5);
}

.result {
    margin-top: 20px;
    padding: 20px;
    background: rgba(51, 51, 51, 0.8);
    border: 1px solid #fec114;
    border-radius: 10px;
    color: #ffffff;
    font-size: 18px;
    display: none;
}

/* Кнопка переключения темы */
#theme-toggle {
    position: fixed;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    background: rgba(51, 51, 51, 0.8);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

#theme-toggle:hover {
    background: #fec114;
    color: #000;
}

#theme-toggle:active {
    transform: scale(0.9);
}

/* Светлая тема */
.light-theme {
    background: #f8f8f8;
    color: #000;
}

.light-theme .container {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
}

.light-theme select,
.light-theme input {
    background: rgba(255, 255, 255, 0.8);
    color: #000;
}

.light-theme .result {
    background: rgba(255, 255, 255, 0.8);
    color: #000;
    border-color: #fec114;
}

/* Анимации */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-10px); }
    100% { transform: translateX(0); }
}

@keyframes bounce {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.error {
    animation: shake 0.5s ease-in-out;
    border-color: #ff4444 !important;
}

.success {
    animation: bounce 0.5s ease-in-out;
    border-color: #00C851 !important;
}

.slide-in {
    animation: slideIn 0.5s ease-in-out;
}

/* Экран загрузки */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
    flex-direction: column;
}

.loader img {
    width: 100px;
    animation: pulse 1.5s infinite;
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: #333333;
    margin-top: 20px;
    border-radius: 2px;
    overflow: hidden;
}

.loader-bar-inner {
    width: 0;
    height: 100%;
    background: #fec114;
    animation: load 2s linear infinite;
}

@keyframes load {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; }
}

/* Адаптация для мобильных */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    h1 {
        font-size: 24px;
    }
    select, input, button {
        padding: 10px;
        font-size: 14px;
    }
    .result {
        font-size: 16px;
    }
    .logo {
        width: 100px;
    }
}

/* Футер */
.footer {
    font-size: 12px;
    margin-top: 20px;
    color: #888;
    text-align: center;
}