/* styles.css */

/* Variables */
:root {
  --bg-color: #12252e;
  --sidebar-bg: #1b2b34;
  --circle-bg: #0d1c23;
  --text-color: white;
  --hover-bg: #0f1a22;
  --switch-bg: #ccc;
  --switch-active-bg: #f5c518;
  --switch-thumb-bg: #fff;
  --switch-thumb-active-bg: #f1f1f1;
}

.light {
  --bg-color: #f5f5f5;
  --sidebar-bg: #e0e0e0;
  --circle-bg: #ccc;
  --text-color: #111;
  --hover-bg: #ddd;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  display: flex;
  height: 100vh;
  transition: background 0.3s, color 0.3s;
  flex-direction: column;
}

.main-container {
  display: flex;
  flex: 1;
  width: 100%;
}

.sidebar {
  width: 60px;
  background: var(--sidebar-bg);
  transition: width 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  position: relative;
}

.sidebar.expanded {
  width: 160px;
  align-items: flex-start;
}

.menu-toggle-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 22px;
  cursor: pointer;
  margin-bottom: 20px;
  align-self: center;
  transition: transform 0.3s ease;
}

.menu-content {
  list-style: none;
  padding: 0;
  width: 100%;
}

.menu-content li {
  width: 100%;
}

.menu-content a {
  display: flex;
  align-items: center;
  padding: 10px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 30px;
  margin: 8px 0;
  transition: background 0.3s ease;
}

.menu-content a:hover,
.menu-content a.active {
  background-color: var(--circle-bg);
}

.icon-container {
  background-color: var(--circle-bg);
  padding: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
}

.material-symbols-outlined {
  font-size: 20px;
}

.menu-content span.label {
  margin-left: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.sidebar.expanded .menu-content span.label {
  opacity: 1;
}

.content {
  display: none;
  padding: 10px;
  flex: 1;
  transition: margin-left 0.3s ease;
}

.content.active {
  display: block;
}

.content.flexible {
  margin-left: 60px;
}

.sidebar.expanded + .content.flexible {
  margin-left: 150px;
}

.theme-toggle {
  margin-top: 20px;
  display: flex;
  align-items: center;
}

.switch {
  width: 60px;
  height: 30px;
  background-color: var(--circle-bg);
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  transition: background 0.3s ease;
}

.switch .icon {
  color: var(--text-color);
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  z-index: 0;
}

body.light .switch-thumb {
  transform: translateX(30px);
}




@media (max-width: 300px) {
  .sidebar {
    width: 0;
    display: none;
  }

  .sidebar.active {
    display: flex;
    width: 100px;
  }

  .main-container {
    flex-direction: column;
  }

  .menu-content a {
    font-size: 10px;
    padding: 10px;
  }

  .theme-toggle button {
    padding: 8px 16px;
  }
}
