body {
    font-family: "Arial", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff;
}
.navbar {  
    background-color: #2ac486;
    padding: 10px;
}
.navbar-toggler { 
    top: 70px;
    right: 20px; 
}
.navbar-brand {
    color: rgb(9, 9, 9); 
    font-size: 2rem;
}
.left-image-container {
    position: relative;
    height: 50vh; 
    overflow: hidden;
}

.left-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

.nav-link {
    color: #333;
    padding: 10px 15px;
}

.nav-link:hover {
    background-color: #0f0f10;
    color: #fff;
}

.display-4 {
    font-size: 2.0rem;
    font-weight: bold;
    color: #0c0b0b;
}

.lead {
    font-size: 1.25rem;
    color: #030303;
}

section {
    background-color: rgba(0, 0, 0, 0.5); 
    color: rgb(4, 4, 4);
}

.carousel {
    position: relative;
    width: 70%; 
    margin: 90px auto; 
}

.carousel-inner {
    border-radius: 10px; 
    overflow: hidden;
}

.carousel-item img {
    object-fit: cover; 
    width: 100%; 
    height: 500px; 
}

.carousel-caption {
    background-color: rgba(0, 0, 0, 0.5); 
    border-radius: 5px;
}

.carousel-caption h5 {
    color: #fff; 
    font-size: 1.5em; 
    font-weight: bold;
}


.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(12, 11, 11, 0.5); 
    border-radius: 50%; 
    padding: 10px;
}

.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
    background-color: rgba(0, 0, 0, 0.8); 
}


@media (max-width: 768px) {
    .carousel-item img {
        height: 300px; 
    }
}

main {
    padding: 2rem;
}

section {
    padding: 50px 0; 
    background-color: #fff; 
}

header {
    background-color: #6ea1e5; 
    color: rgb(16, 13, 13); 
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.5); 
    margin-top: 50px; 
}

h2 {
    color: #090809; /* Цвет заголовка */
    font-size: 2.5em; /* Размер шрифта */
    margin-bottom: 20px; /* Отступ внизу заголовка */
}

.card {
    border: 1px solid #ddd; 
    border-radius: 8px; 
    transition: transform 0.3s; 
    width: 100%; 
    height: 100%; 
    max-width: 500px; 
    margin: auto; 
}

.card:hover {
    transform: scale(1.05); 
}

.card-img-top {
    height: 300px; 
    object-fit: cover; 
}

.card-title {
    font-size: 1.8em; 
    color: #6d5ad4; 
}

.card-text {
    font-size: 1.1em; 
    color: #555; 
}

footer {
    background-color: #7397db;
    color: white;
    text-align: center;
    padding: 0.5rem;
    position: fixed;
    bottom: 0;
    width: 100%;
}


@media (max-width: 768px) {
    h2 {
        font-size: 2em; 
    }

    .card-title {
        font-size: 1.2em; 
    }
}

.layout {
    width: 600px;
    margin: auto;
}

.ASK {
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    background: #7397db;
    border-radius: 10px;
}

.ASK__question p {
    margin: 5px;
    padding: 0;
    font-family: Verdana;
    font-size: 20px;
}

.ASK__answer p {
    margin: 5px;
    padding: 10px;
    font-size: large;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: rgb(255, 255, 255);
    background: #7397db;
    border-radius: 10px;
}

.ASK:hover {
    cursor: pointer;
}

.ASK__answer {
    display: none; 
}

.ASK.active .ASK__answer {
    display: block; 
}
.change-mode {
    background-color: #975788;
    color:#fff
}
.color-button {
    background-color: #2a57ea; 
    color: white;              
    padding: 10px 15px;        
    border-radius: 5px;     
    font-size: 10px;           
}
.error { 
    color: red; 
}     

.popup {
    display: none; /* Изначально скрыто */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.popup.active {
    display: flex; /* Показывается при активации */
}

#popup-form {
    display: none;
}

.popup-content {
    background-color: #f9f9f9;
    padding: 25px 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 350px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: left;
}

/* Close Button */
.close {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 22px;
    color: #333;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ff4d4d;
}

.is-invalid {
    border: 2px solid red;  /* Красная граница для невалидных полей */
}
.is-invalid:focus {
    outline: none;
    box-shadow: 0 0 5px red; /* Красное свечение вокруг поля при фокусе */
}

input:invalid,
textarea:invalid,
select:invalid 
{
 border: 2px solid red; 
}


.error-message {
    color: red; 
}

.carousel-caption.night-mode {
    background-color: rgba(0, 0, 0, 0.7);
}

#greeting{
    font-size: 40px;
    text-align: center; 
}

#content {
    margin-top: 20px;
}

.star {
    font-size: 40px; 
    color: gold;
    cursor: pointer;
    transition: transform 0.3s;
    align-items: center; 
}
#rating-output {
    font-size: 20px; 
    color:blue;
    align-items: center;
    justify-content: center;
    height: 50px;
}
/* Контейнер для анимации */
.animation-container {
    overflow: hidden;
    width: 100%;
    height: 100px; /* Настройте высоту контейнера */
    position: relative;
  }
  
  /* Стили для самолета */
  .plane {
    position: absolute;
    left: -100px; /* Начальная позиция самолета за пределами экрана */
    width: 140px; /* Размер изображения */
    animation: fly-right 5s linear infinite;
  }
  
  /* Анимация движения вправо */
  @keyframes fly-right {
    0% {
      left: -100px;
    }
    100% {
      left: 100%; /* Конечная позиция за пределами экрана справа */
    }
  }
  
.error-message { 
    color: red; 
}
#response-message { 
    margin-top: 10px; font-weight: bold;
}


/* Light Theme (Default) */
body {
    background-color: #ffffff;
    color: #333;
}

.navbar {
    background-color: #f8f9fa;
    color: #333;
    border-bottom: 1px solid #ccc;
}

.card, .offcanvas, .btn, .form-control {
    background-color: #ffffff;
    color: #333;
    border-color: #ccc;
}

.carousel-caption {
    background: rgba(255, 255, 255, 0.7);
    color: #050505;
}

.footer {
    background-color: #007bff;
    color: #333;
    padding: 20px;
    text-align: center;
}

a {
    color: #007bff;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

/* Dark Theme */
body.dark {
    background-color: #333;
    color: #f5f5f5;
}

body.dark .navbar,
body.dark .footer {
    background-color: #222;
    color: #f5f5f5;
    border-bottom: 1px solid #444;
}

body.dark .card,
body.dark .offcanvas,
body.dark .btn,
body.dark .form-control {
    background-color: #060606;
    color: #f5f5f5;
    border-color: #666;
}

body.dark .carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    color: #f5f5f5;
}

body.dark a {
    color: #add8e6;
}

body.dark .btn-primary {
    background-color: #0056b3;
    border-color: #004085;
}

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Navbar styling */
.navbar {
    background-color: #3988d6;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

/* Brand styling */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

/* Menu styling */
.navbar-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem; /* Space between each menu item */
}

.navbar-menu .nav-item .nav-link {
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-menu .nav-item .nav-link:hover {
    color: #007bff;
}

.navbar-menu {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
}

.navbar-menu .nav-item {
  margin-right: 1rem;
}

.navbar-menu .nav-link {
  text-decoration: none;
  color: #000;
}

.navbar-menu .nav-link:hover {
  color: #007bff;
}

.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #007bff;
}

input:checked + .slider:before {
  transform: translateX(14px);
}




/* Search form styling */
.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.btn-outline-success {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 5px;
    border: 1px solid #28a745;
    color: #28a745;
    background-color: transparent;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-outline-success:hover {
    background-color: #28a745;
    color: #fff;
}

#theme-toggle-btn {
    background: transparent;
    border: none;
    padding: 0;
}

.theme-icon {
    width: 50px; /* Adjust the size as needed */
    height: 50px;
    cursor: pointer;
}

/* Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Global Dark and Light Mode Styles */
body.light-mode {
    background-color: #ffffff;
    color: #000000;
}

body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

/* Navbar Styles */
.navbar {
    background-color: var(--navbar-bg);
    color: var(--navbar-text);
}

body.light-mode .navbar {
    --navbar-bg: #eaeff4;
    --navbar-text: #000000;
}

body.dark-mode .navbar {
    --navbar-bg: #000000;
    --navbar-text: #ffffff;
}

/* Footer Styles */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
}

body.light-mode footer {
    --footer-bg: #8fbeec;
    --footer-text: #000000;
}

body.dark-mode footer {
    --footer-bg: #333333;
    --footer-text: #ffffff;
}

/* Card and Section Backgrounds */
.card, .popup-content, .left-image-container, .carousel-caption {
    background-color: var(--card-bg);
    color: var(--card-text);
}

body.light-mode .card,
body.light-mode .popup-content,
body.light-mode .left-image-container,
body.light-mode .carousel-caption {
    --card-bg: #ffffff;
    --card-text: #000000;
}

body.dark-mode .card,
body.dark-mode .popup-content,
body.dark-mode .left-image-container,
body.dark-mode .carousel-caption {
    --card-bg: #444444;
    --card-text: #ffffff;
}

/* Button Styles */
.btn {
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border: none;
}

body.light-mode .btn-primary {
    --btn-bg: #007bff;
    --btn-text: #ffffff;
}

body.dark-mode .btn-primary {
    --btn-bg: #1f73b7;
    --btn-text: #ffffff;
}

/* Specific Text and Section Headers */
h1, h2, h3, p {
    color: var(--text-color);
}

body.light-mode h1, body.light-mode h2, body.light-mode h3, body.light-mode p {
    --text-color: #000000;
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode p {
    --text-color: #ffffff;
}
/* Styles for the welcome section in light and dark mode */
body.light-mode .container, 
body.light-mode .row, 
body.light-mode .col-md-6 {
    background-color: #ffffff; /* Light background */
    color: #000000; /* Light text color */
}

body.dark-mode .container, 
body.dark-mode .row, 
body.dark-mode .col-md-6 {
    background-color: #1a1a1a; /* Dark background */
    color: #ffffff; /* Dark text color */
}
/* General text color for both themes */
body.light-mode h1, 
body.light-mode p {
    color: #000000; /* Dark text for light mode */
}

body.dark-mode h1, 
body.dark-mode p {
    color: #ffffff; /* Light text for dark mode */
}

/* Specific targeting for main title and description */
body.light-mode #main-title,
body.light-mode #main-description {
    color: #000000; /* Light mode color for main title and description */
}

body.dark-mode #main-title,
body.dark-mode #main-description {
    color: #ffffff; /* Dark mode color for main title and description */
}
/* Light and Dark Mode for Blue Section Backgrounds */
body.light-mode .blue-section {
    background-color: #ffffff; /* Light blue for light mode */
    color: #000000; /* Dark text for readability */
}

body.dark-mode .blue-section {
    background-color: #000000;; /* Dark blue for dark mode */
    color: #ffffff; /* Light text for readability */
}

/* Light and Dark Mode for White Section Backgrounds */
body.light-mode .white-section {
    background-color: #ffffff; /* White background for light mode */
    color: #000000;
}

body.dark-mode .white-section{
    background-color: #333333; /* Dark gray for dark mode */
    color: #ffffff;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Light Mode Navbar */
body.light-mode .navbar {
    background-color: #87CEEB; /* Light blue background for light mode */
    color: #000000; /* Dark text color for readability */
}

body.light-mode .navbar a.navbar-brand,
body.light-mode .navbar a.nav-link,
body.light-mode .navbar-menu,
body.light-mode #theme-toggle-switch,
body.light-mode #language-selector {
    color: #000000; /* Text color for light mode */
}

body.light-mode #theme-toggle-switch .slider {
    background-color: #ddd; /* Light slider background */
}

/* Dark Mode Navbar */
body.dark-mode .navbar {
    background-color: #0b0e10; /* Dark blue background for dark mode */
    color: #ffffff; /* Light text color for readability */
}

body.dark-mode .navbar a.navbar-brand,
body.dark-mode .navbar a.nav-link,
body.dark-mode .navbar-menu,
body.dark-mode #theme-toggle-switch,
body.dark-mode #language-selector {
    color: #ffffff; /* Text color for dark mode */
}

body.dark-mode #theme-toggle-switch .slider {
    background-color: #0b0b0b; /* Dark slider background */
}

/* Button Styling in Navbar for Contrast */
body.light-mode .btn-primary {
    background-color: #007bff; /* Light mode button color */
    color: #ffffff;
}

body.dark-mode .btn-primary {
    background-color: #1f73b7; /* Dark mode button color */
    color: #ffffff;
}

/* Dropdown Menu Styling */
body.light-mode #language-selector {
    background-color: #ffffff; /* Light mode dropdown */
    color: #000000;
}

body.dark-mode #language-selector {
    background-color: #444444; /* Dark mode dropdown */
    color: #ffffff;
}


body.dark-mode .popup {
    background-color: #333333; /* Dark gray for dark mode */
    color: #ffffff;
}
/* Light Mode Styling */
body.light-mode .white-section {
    background-color: #ffffff; /* White background for light mode */
    color: #000000;
}

/* Dark Mode Styling */
body.dark-mode .white-section {
    background-color: #1a1a1a; /* Dark background for dark mode */
    color: #ffffff;
}


/* General Variables */
:root {
    --navbar-bg: #ffffff;
    --navbar-text: #000000;
    --offcanvas-bg: #ffffff;
    --offcanvas-text: #000000;
    --nav-link-color: #007bff;
    --nav-link-hover-color: #0056b3;
  }
  
  .dark-mode {
    --navbar-bg: #1a1a1a;
    --navbar-text: #ffffff;
    --offcanvas-bg: #333333;
    --offcanvas-text: #ffffff;
    --nav-link-color: #bb86fc;
    --nav-link-hover-color: #3700b3;
  }
  
  /* Navbar Styles */
  .navbar {
    background-color: var(--navbar-bg);
    color: var(--navbar-text);
  }
  
  .navbar-toggler {
    color: var(--navbar-text);
    border-color: var(--navbar-text);
  }
  
  /* Offcanvas Styles */
  .offcanvas {
    background-color: var(--offcanvas-bg);
    color: var(--offcanvas-text);
  }
  
  .offcanvas-header {
    border-bottom: 1px solid var(--navbar-text);
  }
  
  .offcanvas-title {
    color: var(--offcanvas-text);
  }
  
  .navbar-nav .nav-link {
    color: var(--nav-link-color);
    transition: color 0.3s ease;
  }
  
  .navbar-nav .nav-link:hover {
    color: var(--nav-link-hover-color);
  }
  
  .btn-close {
    filter: invert(1);
  }
  
  /* Light/Dark Mode Toggle */
  body.light-mode .navbar {
    --navbar-bg: #eaeff4;
    --navbar-text: #000000;
  }
  
  body.dark-mode .navbar {
    --navbar-bg: #000000;
    --navbar-text: #ffffff;
  }
  
  body.light-mode .offcanvas {
    --offcanvas-bg: #ffffff;
    --offcanvas-text: #000000;
  }
  
  body.dark-mode .offcanvas {
    --offcanvas-bg: #1a1a1a;
    --offcanvas-text: #ffffff;
  }
  
  body.light-mode .navbar-nav .nav-link {
    --nav-link-color: #007bff;
    --nav-link-hover-color: #0056b3;
  }
  
  body.dark-mode .navbar-nav .nav-link {
    --nav-link-color: #bb86fc;
    --nav-link-hover-color: #3700b3;
  }

  .profile-icon {
    width: 32px; /* Set the size of the icon */
    height: 32px;
    margin-right: 5px; /* Adjust spacing if necessary */
    display: inline-block; /* Ensures the icon is inline with text if any */
    vertical-align: middle;
    border-radius: 50%; /* Optional: makes the icon circular */
}
.nav-item {
    list-style: none; /* Убирает маркер списка */
    margin: 0; /* Убирает возможные отступы */
    padding: 0; /* Убирает возможные отступы */
}


/*API*/
#weatherForm {
    margin-bottom: 15px;}
#city {
    padding: 10px;    margin-bottom: 10px;
    border: 1px solid #ccc;    border-radius: 4px;
}
#weatherResult {    margin-top: 20px;
    font-size: 16px;
}