/* ==========================================================================
   MAIN CSS - FitJourney Global Styles
   ========================================================================== */

:root {
  /* Colors */
  --primary: #8b5fbf;
  --accent: #6c5ce7;
  --success: #00e676;
  --warning: #ffc107;
  --error: #ff5252;
  
  /* Background Colors */
  --bg-color: #0a0a0a;
  --surface-dark: #1a1a1a;
  --darker-bg: #141414;
  --card-bg: #1e1e1e;
  --border-color: #333;
  
  /* Text Colors */
  --text-color: #ffffff;
  --text-secondary: #b0b0b0;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header Styles */
.header {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(139, 95, 191, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-circle {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1rem;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width var(--transition);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.theme-toggle button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.theme-toggle button:hover {
  color: var(--primary);
}

.user-profile-dropdown {
  position: relative;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50px;
  transition: var(--transition);
}

.user-profile:hover {
  background: rgba(139, 95, 191, 0.1);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface-dark);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 200px;
  padding: 0.5rem 0;
  display: none;
  z-index: 1000;
  border: 1px solid rgba(139, 95, 191, 0.2);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.dropdown-menu a:hover {
  background: rgba(139, 95, 191, 0.1);
  color: var(--primary);
}

.user-profile-dropdown:hover .dropdown-menu {
  display: block;
}

/* Main Content */
.main {
  flex: 1;
  padding: 2rem 0;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 15px rgba(139, 95, 191, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 95, 191, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-color);
  border: 2px solid rgba(139, 95, 191, 0.3);
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: rgba(139, 95, 191, 0.1);
  transform: translateY(-2px);
}

.btn-danger {
  background-color: #E74C3C;
  color: white;
}

.btn-danger:hover {
  background-color: #C0392B;
  transform: translateY(-2px);
}

/* Footer Styles */
.footer {
  background: var(--surface-dark);
  border-top: 1px solid rgba(139, 95, 191, 0.2);
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.footer-section h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 1.25rem;
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(139, 95, 191, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(139, 95, 191, 0.2);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-secondary);
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

/* Loading Animation */
@keyframes loading {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading {
  animation: loading 1s linear infinite;
}

/* Message Styles */
.message {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.message.success {
  background: rgba(0, 230, 118, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.message.error {
  background: rgba(255, 82, 82, 0.1);
  color: var(--error);
  border-left: 4px solid var(--error);
}

.message.info {
  background: rgba(33, 150, 243, 0.1);
  color: #2196f3;
  border-left: 4px solid #2196f3;
}

/* AI Chatbot */
.ai-chatbot {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 350px;
  height: 500px;
  background: var(--surface-dark);
  border-radius: 12px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  border: 1px solid rgba(139, 95, 191, 0.3);
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}

.chat-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.chat-header button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.chat-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-message {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  max-width: 80%;
}

.chat-message.bot {
  background: rgba(139, 95, 191, 0.1);
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

.chat-message.user {
  background: rgba(139, 95, 191, 0.2);
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.chat-footer {
  display: flex;
  padding: 1rem;
  border-top: 1px solid rgba(139, 95, 191, 0.2);
}

.chat-footer input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: rgba(139, 95, 191, 0.1);
  border-radius: 8px 0 0 8px;
  color: var(--text-color);
}

.chat-footer button {
  padding: 0.75rem 1rem;
  background: var(--primary);
  border: none;
  border-radius: 0 8px 8px 0;
  color: white;
  cursor: pointer;
}

#chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(139, 95, 191, 0.3);
  z-index: 999;
  transition: var(--transition);
}

#chat-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 95, 191, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav {
    display: none;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .ai-chatbot {
    width: 90%;
    height: 70vh;
    bottom: 80px;
    right: 5%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .header .container {
    padding: 0.75rem 0.5rem;
  }
  
  .logo {
    font-size: 1.1rem;
  }
  
  .logo-circle {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
}