* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* AUTH CONTAINER */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: 1000;
  padding: 20px;
  overflow: auto;
}

.login-card {
  background: white;
  padding: 50px 40px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 420px;
  animation: slideUp 0.5s ease;
  margin: auto;
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-header h1 {
  font-size: 32px;
  color: #667eea;
  margin-bottom: 10px;
  font-weight: 700;
}

.login-header p {
  color: #666;
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.input-field {
  width: 100%;
  padding: 14px;
  margin: 10px 0;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: #f9fafb;
}

.input-field:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.button-group {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}

.btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
  border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
  background: #e5e7eb;
  transform: translateY(-2px);
}

.btn-guest {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.btn-guest:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

.divider {
  text-align: center;
  margin: 20px 0 15px;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
}

.btn-large {
  width: 100%;
  padding: 18px;
  font-size: 16px;
  margin: 20px 0;
}

.error-message {
  color: #dc2626;
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
}

.divider {
  text-align: center;
  margin: 20px 0 15px;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
}

.google-btn {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

#google-signin-button {
  display: flex;
  justify-content: center;
}

/* DASHBOARD */
.dashboard-container {
  display: flex;
  min-height: 100vh;
  background: #f8f9fa;
}

.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  padding: 0 25px;
  margin-bottom: 40px;
}

.nav-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 15px;
}

.nav-item {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-size: 15px;
  font-weight: 500;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.3);
  border-left: 4px solid white;
}

.logout-btn {
  margin: 20px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: rgba(255, 0, 0, 0.3);
  border-color: rgba(255, 0, 0, 0.5);
}

.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 40px;
  overflow-y: auto;
}

.section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.section.active {
  display: block;
}

.header {
  margin-bottom: 40px;
}

.header h1 {
  font-size: 32px;
  color: #1f2937;
  margin-bottom: 10px;
}

.header p {
  color: #6b7280;
  font-size: 16px;
}

/* UPLOAD ZONE */
.upload-zone {
  background: white;
  padding: 50px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 3px dashed #667eea;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
  position: relative;
}

.upload-zone:hover {
  border-color: #764ba2;
  background: #f8f9ff;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.upload-zone.drag-over {
  border-color: #764ba2;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  transform: scale(1.02);
}

.upload-content {
  cursor: pointer;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 15px;
  animation: bounce 2s infinite;
}

.upload-content h3 {
  color: #1f2937;
  margin-bottom: 10px;
  font-size: 18px;
}

.upload-content p {
  color: #6b7280;
  font-size: 14px;
  margin: 8px 0;
}

.upload-link {
  color: #667eea;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.upload-link:hover {
  color: #764ba2;
}

.file-input {
  display: none;
}

.file-name {
  color: #10b981;
  font-weight: 600;
  margin-top: 15px;
}

/* METRICS GRID */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.metric-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.metric-card h3 {
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: #667eea;
}

.stress-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stress-card h3 {
  color: rgba(255, 255, 255, 0.8);
}

.stress-score {
  font-size: 48px;
  font-weight: 700;
  color: white;
  margin: 15px 0;
}

.stress-level {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
}

/* CHARTS GRID */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.chart-container {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.chart-container h3 {
  margin-bottom: 20px;
  color: #1f2937;
  font-size: 16px;
}

canvas {
  max-height: 300px;
}

/* WELLNESS CONTAINER */
.wellness-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.suggestions-box,
.wellness-box {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.suggestions-box h3,
.wellness-box h3 {
  color: #1f2937;
  margin-bottom: 20px;
  font-size: 18px;
}

.suggestions-list {
  list-style: none;
}

.suggestions-list li {
  padding: 12px;
  margin: 8px 0;
  background: #f0f4ff;
  border-left: 4px solid #667eea;
  border-radius: 6px;
  color: #333;
  font-size: 14px;
}

.relaxation-tips,
.smart-tips {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tip-item {
  padding: 15px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 4px solid #764ba2;
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

/* ANIMATIONS */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* RESPONSIVE - Tablets and Medium Devices */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }
  
  .main-content {
    margin-left: 240px;
    padding: 30px 20px;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

/* RESPONSIVE - Small Tablets and Large Phones */
@media (max-width: 768px) {
  .dashboard-container {
    flex-direction: column;
  }
  
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 15px 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  .logo {
    padding: 0 15px;
    margin-bottom: 0;
    font-size: 20px;
  }
  
  .nav-menu {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0 15px;
    gap: 5px;
  }
  
  .nav-item {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .logout-btn {
    margin: 0 15px;
    padding: 10px 15px;
    font-size: 13px;
  }
  
  .main-content {
    margin-left: 0;
    padding: 20px 15px;
  }
  
  .login-card {
    padding: 30px 20px;
    max-width: 100%;
  }
  
  .login-header h1 {
    font-size: 24px;
  }
  
  .header h1 {
    font-size: 24px;
  }
  
  .metrics-grid,
  .charts-grid,
  .wellness-container {
    grid-template-columns: 1fr;
  }
  
  .upload-zone {
    padding: 30px;
  }
  
  .upload-icon {
    font-size: 36px;
  }
  
  .upload-content h3 {
    font-size: 16px;
  }
  
  .btn-large {
    padding: 15px;
    font-size: 14px;
  }
}

/* RESPONSIVE - Phones */
@media (max-width: 480px) {
  .dashboard-container {
    flex-direction: column;
  }
  
  .sidebar {
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
  }
  
  .logo {
    padding: 0;
    margin-bottom: 15px;
    text-align: center;
    font-size: 18px;
  }
  
  .nav-menu {
    flex-direction: column;
    padding: 0;
    margin-bottom: 15px;
  }
  
  .nav-item {
    width: 100%;
    padding: 12px;
    font-size: 13px;
  }
  
  .logout-btn {
    margin: 0;
    width: 100%;
  }
  
  .main-content {
    padding: 15px;
  }
  
  .login-card {
    padding: 20px;
  }
  
  .login-header h1 {
    font-size: 20px;
  }
  
  .header h1 {
    font-size: 20px;
  }
  
  .header p {
    font-size: 13px;
  }
  
  .button-group {
    flex-direction: column;
    gap: 8px;
  }
  
  .input-field {
    padding: 12px;
    font-size: 14px;
  }
  
  .metric-card {
    padding: 15px;
  }
  
  .metric-card h3 {
    font-size: 12px;
  }
  
  .metric-value {
    font-size: 20px;
  }
  
  .stress-score {
    font-size: 36px;
  }
  
  .upload-zone {
    padding: 20px;
    border: 2px dashed #667eea;
  }
  
  .upload-icon {
    font-size: 32px;
  }
  
  .upload-content h3 {
    font-size: 14px;
  }
  
  .upload-content p {
    font-size: 12px;
  }
  
  .info-text {
    font-size: 11px;
  }
  
  .chart-container {
    padding: 15px;
  }
  
  .chart-container h3 {
    font-size: 14px;
  }
  
  .suggestions-box,
  .wellness-box {
    padding: 15px;
  }
  
  .suggestions-box h3,
  .wellness-box h3 {
    font-size: 15px;
  }
  
  .suggestions-list li {
    padding: 8px;
    font-size: 12px;
  }
  
  .tip-item {
    padding: 10px;
    font-size: 12px;
  }
}
