body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--background);
  font-family: "Poppins", sans-serif;
  display: flex;
  overflow-x: hidden;
  overflow: hidden;
  color: var(--text);
  position: relative;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-dark);
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
  animation: pulse-bg 15s infinite alternate;
}

@keyframes pulse-bg {
  0% { opacity: 0.2; }
  50% { opacity: 0.4; }
  100% { opacity: 0.3; }
}

#sidebar {
  width: 270px;
  padding: 24px;
  border: 1px solid var(--border);
  margin-top: 20px;
  margin-left: 15px;
  margin-bottom: 20px;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  background: var(--primary);
  border-radius: 16px;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 10;
  overflow: hidden;
}

#sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  z-index: 11;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.menu-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.menu-item:hover {
  background: var(--active-tab);
  transform: translateX(6px) scale(1.02);
  box-shadow: 0 6px 16px var(--accent-glow);
}

.menu-item:hover::before {
  transform: scaleY(1);
}

.menu-icon {
  font-size: 24px;
  margin-right: 14px;
  color: var(--accent);
  transition: all 0.3s ease;
}

.sidebar-icons {
  width: 32px;
  margin-right: 14px;
  height: 32px;
  fill: var(--accent);
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 2px var(--accent-glow));
}

.menu-item:hover .sidebar-icons {
  fill: var(--accent-light);
  transform: scale(1.1) rotate(5deg);
}

.menu-label {
  font-size: 16px;
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
}

.menu-item:hover .menu-label {
  transform: translateX(3px);
  text-shadow: 0 0 8px var(--accent-glow);
}

#content {
  flex: 1;
  margin: 20px;
  padding: 32px;
  width: calc(85vw - 60px);
  color: var(--text);
  transition: all 0.4s ease;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  backdrop-filter: blur(5px);
  
  max-height: 90%;
  
  background: linear-gradient(45deg, transparent, var(--border), transparent);
  
  overflow-y: auto;
  overflow-x: hidden;
}

#content::-webkit-scrollbar {
  width: 8px;
}

#content::-webkit-scrollbar-track {
  background: var(--primary-dark);
  border-radius: 10px;
}

#content::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--accent), var(--accent-light));
  border-radius: 10px;
  border: 2px solid var(--primary-dark);
}

#content::-webkit-scrollbar-thumb:hover {
  background: var(--accent-light);
}

.content-title {
  font-size: 32px;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  margin-bottom: 28px;
  position: relative;
  display: inline-block;
  text-shadow: 0 2px 10px var(--accent-glow);
  letter-spacing: 0.5px;
}

.content-title:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  height: 4px;
  width: 70px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 4px;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--accent-light);
  font-family: "Roboto", sans-serif;
  margin-bottom: 0px;
  position: relative;
  display: inline-block;
}

.section-text{
  margin-top: 5px;
}

.buttons {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

button {
  font-family: "Poppins", sans-serif;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--accent-glow) 10%, transparent 60%);
  opacity: 0;
  transform: scale(0.5);
  transition: transform 0.5s ease, opacity 0.5s ease;
  pointer-events: none;
}

button:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px var(--accent-glow);
}

button:hover::after {
  opacity: 0.4;
  transform: scale(1);
}

.input-field {
  width: 45%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  margin-top: 5px;
  color: var(--text);
  font-family: "Poppins", sans-serif;
  background-color: var(--secondary);
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.select-buttons {
  display: flex;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 14px;
}

.select-buttons .icon-button,
.icon-button {
  background: linear-gradient(145deg, var(--accent), var(--primary-dark));
  background-size: 200% 200%;
  animation: gradient-shift 5s ease infinite;
  color: var(--text);
  border: none;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px var(--accent-glow);
  position: relative;
  overflow: hidden;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.icon-button:hover {
  background-color: var(--accent-light);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 16px var(--accent-glow);
}

.icon-button svg {
  fill: var(--text);
  width: 20px;
  margin-right: 10px;
  height: 20px;
  transition: transform 0.3s ease;
}

.icon-button:hover svg {
  transform: rotate(10deg) scale(1.1);
}

.select-buttons button {
  background: none;
  color: var(--accent-light);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  transition: all 0.3s ease;
  position: relative;
}

.select-buttons button:hover {
  background-color: rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.select-buttons button::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-light);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: right;
}

.select-buttons button:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.input-field select {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background-color: var(--secondary);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23bae6fd' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  transition: all 0.3s ease;
}

.input-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  transform: translateY(-2px);
}

#themeSelector option {
  padding: 12px;
  font-family: "Poppins", sans-serif;
  background-color: var(--primary);
}

select option {
  font-family: "Poppins", sans-serif;
  padding: 14px;
}

.box {
  background: linear-gradient(145deg, var(--secondary), var(--primary));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  font-family: "Rubik", sans-serif;
  margin: 20px 0;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.box::before {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.box:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 14px 28px var(--accent-glow);
  border-color: var(--accent);
}

.box:hover::before {
  opacity: 0.4;
}

.box-header {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.box-header::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0.7);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.box:hover .box-header::after {
  transform: scaleX(1);
}

.tag {
  font-size: 14px;
  color: var(--accent-light);
  background-color: rgba(59, 130, 246, 0.15);
  padding: 6px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-top: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.tag:hover {
  background-color: rgba(59, 130, 246, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--accent-glow);
}

.status {
  display: flex;
  align-items: center;
  margin-top: -40px;
}

.flashing-light {
  width: 12px;
  height: 12px;
  background-color: var(--accent-light);
  border-radius: 50%;
  margin-right: 10px;
  animation: pulse 2.5s infinite;
  box-shadow: 0 0 10px var(--accent-glow);
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 var(--accent-glow);
  }
  
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 12px 3px var(--accent-glow);
  }
  
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.online-text {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 30px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: var(--primary-dark);
  border-radius: 34px;
  transition: 0.4s;
  width: 56px;
  height: 30px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  top: 4px;
  background-color: var(--text);
  border-radius: 50%;
  transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

input:checked + .slider {
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1), 0 0 5px var(--accent-glow);
}

input:checked + .slider:before {
  transform: translateX(26px);
  background: var(--text);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

input[type="color"] {
  background-color: var(--secondary);
  border: 3px solid var(--border);
  color: var(--text);
  padding: 3px;
  border-radius: 12px;
  cursor: pointer;
  width: 100px;
  height: 45px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

input[type="color"]:hover {
  border-color: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--accent-glow);
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 8px;
}

input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 8px;
}

.notification {
  color: var(--accent-light);
  font-size: 14px;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  margin-left: 5px;
  transition: all 0.6s ease;
  position: relative;
  overflow: hidden;
}


.fade-in {
  opacity: 1;
  transform: translateY(0);
  animation: fade-in 0.5s ease forwards;
}

.fade-out {
  opacity: 0;
  transform: translateY(10px);
  animation: fade-out 0.5s ease forwards;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(15px);
  }
}

.themes-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  margin: 28px 0;
}

.theme {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 25px;
  border-radius: 16px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border-style: solid;
  border-width: 2px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.theme::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, var(--accent-glow), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.theme:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 14px 28px var(--accent-glow);
}

.theme:hover::before {
  opacity: 0.2;
}


.theme:hover:after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.color {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  margin-right: 18px;
  transition: all 0.8s ease;
  outline: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--border);
}


@media (max-width: 768px) {
  body {
    display: block;
  }
  
  #sidebar {
    width: calc(100% - 60px);
    padding: 20px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    margin: 16px auto;
    height: auto;
    border-radius: 16px;
  }

  #content {
    width: calc(100% - 74px);
    margin: 20px auto;
    padding: 24px;
    max-height: 68vh;
  }

  .menu-item {
    padding: 12px 16px;
  }

  .menu-icon {
    font-size: 22px;
  }

  .menu-label {
    font-size: 16px;
  }

  .content-title {
    font-size: 28px;
  }

  .section-title {
    font-size: 20px;
  }

  .buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .input-field {
    width: 100%;
    margin-bottom: 18px;
  }

  .select-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .select-buttons .icon-button,
  .icon-button {
    font-size: 14px;
    padding: 10px 14px;
    margin-bottom: 10px;
  }

  .box {
    padding: 18px;
    font-size: 14px;
  }

  .box-header {
    font-size: 18px;
  }

  .status {
    margin-top: 12px;
  }

  .themes-container {
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 18px 0;
  }

  .theme {
    width: 100%;
    font-size: 16px;
    padding: 16px 18px;
  }

  .color {
    width: 28px;
    height: 28px;
  }
}