:root {
  --primary-color: #e0e5ec;
  --text-color: #333;
  --shadow-color: #a3b1c6;
  --highlight-color: #ffffff;
  --accent-color: #4a90e2;
}

[data-theme="dark"] {
  --primary-color: #2d3436;
  --text-color: #ecf0f1;
  --shadow-color: #1a1d1e;
  --highlight-color: #34393b;
  --accent-color: #74b9ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--primary-color);
  color: var(--text-color);
  transition: all 0.3s ease;
}

.wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  width: 250px;
  background-color: var(--primary-color);
  padding: 1rem;
  position: fixed;
  height: 100vh;
  z-index: 1000;
  left: 0;
  top: 0;
  transition: transform 0.3s ease;
  box-shadow: 
    5px 0 10px var(--shadow-color);
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 0.8rem;
  color: var(--text-color);
  text-decoration: none;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.sidebar-nav a:hover {
  background-color: var(--highlight-color);
}

/* Main Content Styles */
.main-content {
  margin-left: 250px; /* Match sidebar width */
  flex: 1;
  transition: margin-left 0.3s ease;
  padding: 1rem;
}

.header-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: var(--primary-color);
  padding: 1rem;
  margin: -1rem -1rem 2rem -1rem;
  box-shadow: 0 2px 5px var(--shadow-color);
}

/* Progress Bar */
.progress-bar {
  position: sticky;
  top: 70px; /* After header */
  z-index: 998;
  width: 100%;
  height: 4px;
  background-color: var(--highlight-color);
  margin: 1rem 0;
  border-radius: 2px;
}

.progress {
  width: 0%;
  height: 100%;
  background-color: var(--accent-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Floating Button */
.floating-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.5rem;
  z-index: 100;
}

/* Popup */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
}

.popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--primary-color);
  padding: 2rem;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
}

.preferences {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}

/* Tab Styles */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
}

.tab-btn i {
  font-size: 1.2rem;
}

.tab-btn.active {
  background-color: var(--accent-color);
  color: white;
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.2);
}

.tab-content {
  margin-top: 1rem;
}

.tab-pane {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.tab-pane.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: fadeIn 0.3s ease;
}

/* Content Cards */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.content-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.content-card i {
  font-size: 2rem;
  color: var(--accent-color);
}

.content-card h4 {
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.stat-card {
  padding: 1.5rem;
  text-align: center;
  border-radius: 15px;
  background-color: var(--primary-color);
  box-shadow: 
    5px 5px 10px var(--shadow-color),
    -5px -5px 10px var(--highlight-color);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-color);
}

.stat-icon {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

/* Dashboard Styles */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: 15px;
  background-color: var(--primary-color);
  box-shadow: 
    5px 5px 10px var(--shadow-color),
    -5px -5px 10px var(--highlight-color);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Mini Site Styles */
.mini-site {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.mini-site-header {
  padding: 2rem;
  text-align: center;
}

.mini-site-header h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mini-site-stats {
  margin: 1rem 0;
}

.stat-row {
  display: flex;
  justify-content: space-around;
  padding: 1.5rem;
}

.stat {
  text-align: center;
}

.stat i {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
}

.mini-site-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1rem;
}

.content-cards {
  display: grid;
  gap: 1rem;
}

.content-card {
  padding: 0;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.content-card:hover {
  transform: translateY(-5px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--accent-color);
  color: white;
}

.card-body {
  padding: 1rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.card-actions button {
  flex: 1;
}

.mini-site-sidebar {
  padding: 1rem;
}

.mini-site-sidebar h3 {
  margin-bottom: 1rem;
}

.mini-site-sidebar ul {
  list-style: none;
}

.mini-site-sidebar li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mini-site-sidebar li:hover {
  background-color: var(--highlight-color);
}

/* Points Display Styles */
.points-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--accent-color);
  background: var(--primary-color);
  border-radius: 20px;
  margin-right: 1rem;
}

.points-display i {
  color: gold;
  animation: spin 2s linear infinite;
}

.points-label {
  font-size: 0.8rem;
  opacity: 0.8;
}

.floating-points {
  position: fixed;
  color: gold;
  font-weight: bold;
  font-size: 1.2rem;
  pointer-events: none;
  animation: floatUp 1s ease-out forwards;
  z-index: 9999;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50px);
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Search Styles */
.search-container {
  position: relative;
  margin: 1rem;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1rem;
}

.search-input {
  width: 100%;
  padding: 0.8rem 2.5rem 0.8rem 1rem;
  border: none;
  border-radius: 10px;
  background-color: var(--primary-color);
  color: var(--text-color);
  font-size: 1rem;
  box-shadow: inset 
    3px 3px 6px var(--shadow-color),
    inset -3px -3px 6px var(--highlight-color);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--primary-color);
  border-radius: 10px;
  margin-top: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 
    5px 5px 10px var(--shadow-color),
    -5px -5px 10px var(--highlight-color);
  display: none;
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 0.8rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-result-item:hover {
  background-color: var(--highlight-color);
}

.search-result-item i {
  color: var(--accent-color);
  width: 20px;
  text-align: center;
}

.search-result-category {
  font-size: 0.8rem;
  color: var(--accent-color);
  margin-left: auto;
  opacity: 0.8;
}

.no-results {
  padding: 1rem;
  text-align: center;
  color: var(--text-color);
  opacity: 0.7;
}

/* Scrollbar Styles for Search Results */
.search-results::-webkit-scrollbar {
  width: 8px;
}

.search-results::-webkit-scrollbar-track {
  background: var(--primary-color);
  border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
}

@media (max-width: 1024px) {
  .mini-site-content {
    grid-template-columns: 1fr;
  }
}

/* Prompts Section Styles */
.prompts-section {
  padding: 1rem;
}

.prompts-categories {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.prompts-category h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.prompt-btn {
  padding: 1rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prompt-btn i {
  color: var(--accent-color);
}