/* ====================== Темная тема ====================== */
body.dark-theme {
    background-color: #1a1a1a;
    color: #e2e8f0;
}

body.dark-theme h1 {
    color: #f1f5f9;
}

body.dark-theme .table-container {
    background-color: #2d3748;
}

body.dark-theme table {
    background-color: #2d3748;
}

body.dark-theme thead {
    background-color: #4a5568;
}

body.dark-theme th {
    background-color: #374151;
    color: #f1f5f9;
}

body.dark-theme td {
    color: #e2e8f0;
}

body.dark-theme .animal-name {
    color: #f1f5f9;
}

body.dark-theme .species-common {
    color: #cbd5e0;
}

body.dark-theme .species-latin {
    color: #a0aec0;
}

/* Подсветка строки при наведении - менее контрастная */
body.dark-theme tr:hover td {
    background-color: #374151;
}

/* Статусы - темнее и приятнее */
body.dark-theme .state-good.animal-name {
    background-color: #276749;
}

body.dark-theme .state-normal.animal-name {
    background-color: #b7791f;
}

body.dark-theme .state-bad.animal-name {
    background-color: #9b2c2c;
}

body.dark-theme .feeding-text {
    color: #f1f5f9;
}

body.dark-theme .add-feeding {
    background-color: #3182ce;
}

body.dark-theme .add-feeding:hover {
    background-color: #2b6cb0;
}

body.dark-theme .edit-feeding:hover,
body.dark-theme .delete-feeding:hover {
    background-color: #4a5568;
    color: #f1f5f9;
}

body.dark-theme .modal-content {
    background-color: #2d3748;
    color: #f1f5f9;
}

body.dark-theme #feedingContent,
body.dark-theme #animalName,
body.dark-theme #animalSpecies,
body.dark-theme #uvbulbInstallDate,
body.dark-theme #uvbulbPower,
body.dark-theme #uvbulbType,
body.dark-theme #uvbulbUvOutput,
body.dark-theme #uvbulbDescription {
    background-color: #374151;
    color: #f1f5f9;
    border-color: #4a5568;
}

body.dark-theme .status-count {
    background-color: #2d3748;
}

body.dark-theme .status-item {
    color: #f1f5f9;
}

body.dark-theme .user-panel {
    background-color: #2d3748;
}

body.dark-theme .top-btn {
    background-color: #374151;
    color: #f1f5f9;
    border-color: #4a5568;
}

body.dark-theme .top-btn:hover {
    background-color: #4a5568;
}

body.dark-theme input,
body.dark-theme select,
body.dark-theme button {
    background-color: #374151;
    color: #f1f5f9;
    border-color: #4a5568;
}

body.dark-theme input:focus,
body.dark-theme select:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

body.dark-theme #uvbulbAge,
body.dark-theme #uvbulbResource {
    color: #f1f5f9;
}

body.dark-theme .uvbulb-no-data {
    background-color: #374151;
    color: #e53e3e;
    border-color: #4a5568;
}

body.dark-theme .uvbulb-panel {
    border-color: #4a5568;
}

body.dark-theme .uvbulb-panel::after {
    background-color: #2d3748;
}

body.dark-theme .uvbulb-panel::before {
    border-color: #2d3748 transparent transparent transparent;
}

body.dark-theme #filtersContainer {
    background-color: #2d3748;
    border-color: #4a5568;
}

body.dark-theme .filter-dropdown {
    background-color: #2d3748;
}

body.dark-theme .dropdown-btn {
    background-color: #374151;
    color: #f1f5f9;
    border-color: #4a5568;
}

body.dark-theme .dropdown-btn:hover {
    border-color: #a0aec0;
}

body.dark-theme .dropdown-content {
    background-color: #374151;
    border-color: #4a5568;
}

body.dark-theme .dropdown-option {
    color: #f1f5f9;
}

body.dark-theme .dropdown-option:hover {
    background-color: #4a5568;
}

body.dark-theme .filter-btn {
    background-color: #3182ce;
}

body.dark-theme .filter-btn:hover {
    background-color: #2b6cb0;
}

body.dark-theme .filter-btn.clear-btn {
    background-color: #718096;
}

body.dark-theme .filter-btn.clear-btn:hover {
    background-color: #4a5568;
}

body.dark-theme .add-animal-btn {
    background-color: #374151;
    color: #f1f5f9;
}

body.dark-theme .add-animal-btn:hover {
    background-color: #4a5568;
}

body.dark-theme .edit-animal-btn {
    color: #cbd5e0;
}

body.dark-theme .edit-animal-btn:hover {
    color: #f1f5f9;
}

/* Цвета диаграммы для темной темы */
body.dark-theme .status-pie {
    background: conic-gradient(
        #276749 0deg 0deg,
        #b7791f 0deg 0deg,
        #9b2c2c 0deg 360deg
    );
}

/* ====================== Модальные окна ====================== */
body.dark-theme .modal-content {
    background-color: #2d3748;
    color: #f1f5f9;
}

body.dark-theme .modal-content h3 {
    color: #f1f5f9;
}

body.dark-theme .modal-content h3 {
    color: #f1f5f9;
}


body.dark-theme textarea,
body.dark-theme input[type="text"],
body.dark-theme input[type="email"],
body.dark-theme input[type="password"],
body.dark-theme input[type="datetime-local"],
body.dark-theme input[type="number"],
body.dark-theme select {
    background-color: #374151;
    color: #f1f5f9;
    border-color: #4a5568;
}

body.dark-theme textarea:focus,
body.dark-theme input[type="text"]:focus,
body.dark-theme input[type="email"]:focus,
body.dark-theme input[type="password"]:focus,
body.dark-theme input[type="datetime-local"]:focus,
body.dark-theme input[type="number"]:focus,
body.dark-theme select:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

body.dark-theme .checkbox-group label {
    color: #f1f5f9;
}

body.dark-theme .checkbox-group input[type="checkbox"] {
    background-color: #374151;
    border-color: #4a5568;
}

body.dark-theme .checkbox-group input[type="checkbox"]:checked {
    background-color: #3182ce;
    border-color: #3182ce;
}

body.dark-theme .modal-buttons {
    border-top: 1px solid #4a5568;
}

body.dark-theme .circle-btn.confirm {
    background-color: #38a169;
}

body.dark-theme .circle-btn.confirm:hover {
    background-color: #2f855a;
}

body.dark-theme .circle-btn.cancel {
    background-color: #c53030;
}

body.dark-theme .circle-btn.cancel:hover {
    background-color: #9b2c2c;
}

body.dark-theme .help-text {
    color: #a0aec0;
}

body.dark-theme #uvbulbResource {
    background-color: #374151;
    color: #f1f5f9;
    border-color: #4a5568;
}

body.dark-theme #uvbulbResource:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

body.dark-theme #animalAge {
    background-color: #374151;
    color: #f1f5f9;
    border-color: #4a5568;
}

body.dark-theme #animalAge:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

body.dark-theme #animalAge option {
    background-color: #2d3748;
    color: #f1f5f9;
}

body.dark-theme #uvbulbType {
    background-color: #374151;
    color: #f1f5f9;
    border-color: #4a5568;
}

body.dark-theme #uvbulbType:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

body.dark-theme #uvbulbType option {
    background-color: #2d3748;
    color: #f1f5f9;
}

body.dark-theme #uvbulbUvOutput {
    background-color: #374151;
    color: #f1f5f9;
    border-color: #4a5568;
}

body.dark-theme #uvbulbUvOutput:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

body.dark-theme small {
    color: #a0aec0;
}

body.dark-theme label {
    color: #cbd5e0;
}

body.dark-theme .uvbulb-container {
    background-color: transparent;
}

body.dark-theme .uvbulb-panel-wrapper {
    background-color: transparent;
}

/* Фон модальных окон */
body.dark-theme #animalModal .modal-content,
body.dark-theme #uvbulbModal .modal-content,
body.dark-theme #feedingModal .modal-content,
body.dark-theme #registerModal .modal-content,
body.dark-theme #loginModal .modal-content {
    background-color: #2d3748 !important;
    color: #f1f5f9 !important;
}

/* Заголовки в модальных окнах */
body.dark-theme .modal-content h3 {
    color: #f1f5f9;
}

/* Лейблы в модальных окнах */
body.dark-theme #animalModal label,
body.dark-theme #uvbulbModal label,
body.dark-theme #feedingModal label,
body.dark-theme #registerModal label,
body.dark-theme #loginModal label {
    color: #cbd5e0;
}

/* Стили для форм в темной теме */
body.dark-theme .form-row label {
    color: #cbd5e0;
}

body.dark-theme .form-row input {
    background-color: #374151;
    color: #f1f5f9;
    border-color: #4a5568;
}

body.dark-theme .form-row input:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

/* Увеличение ширины модального окна регистрации в темной теме */
body.dark-theme #registerModal .modal-content {
    width: 420px;
}

/* Стили для кнопки добавления вида в темной теме */
body.dark-theme .add-species-btn {
    background-color: #4a5568;
    color: #cbd5e0;
    border-color: #718096;
}

body.dark-theme .add-species-btn:hover {
    background-color: #718096;
    color: #f1f5f9;
}

/* Стили для модального окна вида в темной теме */
body.dark-theme #speciesModal .modal-content {
    background-color: #2d3748;
    color: #f1f5f9;
}

body.dark-theme #speciesModal label {
    color: #cbd5e0;
}

body.dark-theme #speciesModal input[type="text"],
body.dark-theme #speciesModal select {
    background-color: #374151;
    color: #f1f5f9;
    border-color: #4a5568;
}

body.dark-theme #speciesModal input[type="text"]:focus,
body.dark-theme #speciesModal select:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

body.dark-theme #speciesModal option {
    background-color: #2d3748;
    color: #f1f5f9;
}