/* Notification Toast Styles */
.notification-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  z-index: 10000;
  min-width: 320px;
  max-width: 400px;
  cursor: pointer;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.notification-toast.visible {
  transform: translateX(0);
  opacity: 1;
}

.notification-toast:hover {
  transform: translateX(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.notification-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary);
  background-opacity: 0.1;
}

.notification-toast.like .notification-icon {
  background: rgba(231, 76, 60, 0.1);
}

.notification-toast.comment .notification-icon {
  background: rgba(52, 152, 219, 0.1);
}

.notification-toast.follow .notification-icon {
  background: rgba(46, 204, 113, 0.1);
}

.notification-toast.friend_request .notification-icon {
  background: rgba(243, 156, 18, 0.1);
}

.notification-content {
  flex: 1 1;
  min-width: 0;
}

.notification-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.notification-message {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 4px;
  word-break: break-word;
}

.notification-sender {
  font-size: 12px;
  color: var(--text-tertiary);
  font-style: italic;
}

.notification-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-top: -4px;
  margin-right: -4px;
}

.notification-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .notification-toast {
    top: 10px;
    right: 10px;
    left: 10px;
    min-width: 0;
    min-width: initial;
    max-width: none;
    max-width: initial;
    margin: 0 10px;
  }
  
  .notification-toast.visible {
    transform: translateY(0);
  }
  
  .notification-toast:hover {
    transform: translateY(0);
  }
}

/* Dark theme adjustments */
.dark .notification-toast {
  background: rgba(40, 44, 52, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Animation for multiple notifications */
.notification-toast:nth-child(2) {
  top: 100px;
}

.notification-toast:nth-child(3) {
  top: 180px;
}

.notification-toast:nth-child(4) {
  top: 260px;
}

@media (max-width: 768px) {
  .notification-toast:nth-child(2) {
    top: 90px;
  }
  
  .notification-toast:nth-child(3) {
    top: 170px;
  }
  
  .notification-toast:nth-child(4) {
    top: 250px;
  }
}
.error-boundary {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  padding: 20px;
  background-color: #ffffff;
  background-color: var(--bg-primary, #ffffff);
}

.error-boundary-content {
  text-align: center;
  max-width: 500px;
  padding: 40px;
  border-radius: 12px;
  background-color: #f8f9fa;
  background-color: var(--bg-card, #f8f9fa);
  border: 1px solid #e1e5e9;
  border: 1px solid var(--border-color, #e1e5e9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.error-boundary h2 {
  color: #1a1a1a;
  color: var(--text-primary, #1a1a1a);
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 600;
}

.error-message {
  color: #666666;
  color: var(--text-secondary, #666666);
  margin-bottom: 24px;
  line-height: 1.5;
}

.error-details {
  text-align: left;
  margin: 20px 0;
  padding: 16px;
  background-color: #f1f3f4;
  background-color: var(--bg-secondary, #f1f3f4);
  border-radius: 8px;
  border: 1px solid #e1e5e9;
  border: 1px solid var(--border-color, #e1e5e9);
}

.error-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #1a1a1a;
  color: var(--text-primary, #1a1a1a);
  margin-bottom: 12px;
}

.error-stack {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #666666;
  color: var(--text-secondary, #666666);
  white-space: pre-wrap;
  word-break: break-all;
}

.error-stack pre {
  background-color: #ffffff;
  background-color: var(--bg-primary, #ffffff);
  padding: 8px;
  border-radius: 4px;
  margin: 8px 0;
  overflow-x: auto;
  max-height: 200px;
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.error-actions button {
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.retry-button {
  background-color: #007bff;
  background-color: var(--accent-primary, #007bff);
  color: white;
}

.retry-button:hover {
  background-color: #0056b3;
  background-color: var(--accent-primary-hover, #0056b3);
  transform: translateY(-1px);
}

.report-button {
  background-color: #ffc107;
  background-color: var(--warning-color, #ffc107);
  color: #1a1a1a;
  color: var(--text-primary, #1a1a1a);
}

.report-button:hover {
  background-color: #e0a800;
  background-color: var(--warning-color-hover, #e0a800);
  transform: translateY(-1px);
}

.home-button {
  background-color: #f1f3f4;
  background-color: var(--bg-secondary, #f1f3f4);
  color: #1a1a1a;
  color: var(--text-primary, #1a1a1a);
  border: 1px solid #e1e5e9;
  border: 1px solid var(--border-color, #e1e5e9);
}

.home-button:hover {
  background-color: #e8eaed;
  background-color: var(--bg-tertiary, #e8eaed);
  transform: translateY(-1px);
}

.error-id {
  margin-top: 16px;
  font-size: 12px;
  color: #999999;
  color: var(--text-tertiary, #999999);
  font-family: 'Courier New', monospace;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .error-boundary {
    padding: 16px;
    min-height: 300px;
  }

  .error-boundary-content {
    padding: 24px;
  }

  .error-actions {
    flex-direction: column;
  }

  .error-actions button {
    width: 100%;
  }
}
.network-status {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  animation: slideDown 0.3s ease-out;
}

.network-status.online {
  background-color: #10b981;
  color: white;
}

.network-status.offline {
  background-color: #ef4444;
  color: white;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
/* Global Styles - Consolidated and Optimized */

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--bg-primary);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg-primary);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === ANIMATIONS === */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* === COMMON COMPONENTS === */
.App {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Loading States */
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--bg-secondary);
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 10px;
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 14px;
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
}

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

.btn-danger:hover {
  background: #dc2626;
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-primary);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-secondary);
  transform: translateY(-2px);
}

/* Navigation */
.nav-bar {
  background: transparent;
  border-bottom: none;
  padding: 0 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  box-shadow: none;
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

/* Scroll-to-Hide Behavior */
.nav-bar {
  transition: transform 0.3s ease-in-out;
}

.nav-bar.nav-hidden {
  transform: translateY(-100%);
}

/* Layout */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px 100px;
  min-height: 100vh;
}

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

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  /* Increased to ensure visibility above all other elements */
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
  padding: 20px;
}

.modal-content {
  background: var(--bg-card);
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  animation: slideUp 0.3s ease-out;
  position: relative;
  z-index: 2001;
}

/* Responsive Utilities */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  /* Additional Utility Classes */
  .hide-on-mobile {
    display: none !important;
  }

  .show-on-mobile {
    display: block !important;
  }

  .flex-on-mobile {
    display: flex !important;
  }

  .main-content {
    /* Accounting for iPhone notch/Dynamic Island and Home Indicator */
    padding:
      calc(60px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(90px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    max-width: 100%;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
  }

  .container {
    padding: 0 16px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .modal-overlay {
    padding: 10px;
  }

  .modal-content {
    width: 95%;
    margin: 0;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 16px;
  }

  /* Prevent horizontal overflow */
  body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
  }

  /* Ensure all content stays within viewport */
  * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Fix navigation for mobile */
  .nav-content {
    padding: 0 10px;
    max-width: 100%;
  }

  .nav-content h1 {
    font-size: 16px;
    max-width: calc(100vw - 120px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Better button sizing on mobile */
  .btn {
    padding: 10px 20px;
    font-size: 14px;
    min-height: 44px;
    /* Touch-friendly size */
  }

  /* Improve form inputs on mobile */
  .form-input,
  .form-textarea {
    font-size: 16px;
    /* Prevent zoom on iOS */
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 60px 12px 80px;
  }

  .container {
    padding: 0 12px;
  }

  .nav-content {
    padding: 0 8px;
  }

  .nav-content h1 {
    font-size: 14px;
    max-width: calc(100vw - 100px);
  }

  .modal-overlay {
    padding: 5px;
  }

  .modal-content {
    width: 100%;
    margin: 0;
    max-width: calc(100vw - 10px);
    max-height: calc(100vh - 10px);
    border-radius: 12px;
  }

  /* Smaller buttons on very small screens */
  .btn {
    padding: 8px 16px;
    font-size: 13px;
    min-height: 40px;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Management */
*:focus {
  outline: none;
}

button:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Print Styles */
@media print {

  .nav-bar,
  .footer-nav,
  .modal-overlay {
    display: none !important;
  }

  .main-content {
    padding: 0;
  }

  body {
    background: white !important;
    color: black !important;
  }
}

/* Disabled Custom Cursor - Use normal cursor behavior */

/* Performance Optimizations for Touch Devices */
@media (hover: none) {
  * {
    cursor: auto !important;
    -webkit-tap-highlight-color: transparent;
  }

  /* Reduce backdrop filters on mobile */
  .nav-bar,
  .footer-nav,
  .modal-overlay {
    -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
  }

  /* Simplify hover effects */
  .card:hover,
  .btn:hover {
    transform: none !important;
  }

  /* Better touch responsiveness */
  button,
  input,
  textarea,
  [role="button"] {
    touch-action: manipulation;
  }

  /* Reduce box shadows on mobile */
  .card,
  .modal-content {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  }

  /* Disable heavy transitions */
  .card,
  .btn {
    transition: background 0.1s ease !important;
  }
}

/* Hardware acceleration for better performance */
.custom-cursor,
.card,
.modal-content,
.btn {
  will-change: transform;
  transform: translateZ(0);
}

/* Optimize scrolling */
.main-content,
.modal-content {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Touch Target Standard */
.touch-target {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
/* Theme Variables */
:root {
  /* Default Dark Theme - Enhanced Black */
  --bg-primary: linear-gradient(135deg, #000000 0%, #1a1a1a 25%, #2d2d2d 50%, #1a1a1a 75%, #000000 100%);
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2d2d2d;
  --bg-card: #1a1a1a;
  --bg-navbar: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(26, 26, 26, 0.9));
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-input: #1a1a1a;
  
  --text-primary: #ffffff;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-on-accent: #ffffff;

  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-secondary: #8b5cf6;
  --accent-danger: #ef4444;
  --accent-primary-rgb: 59, 130, 246;

  --border-primary: rgba(59, 130, 246, 0.3);
  --border-secondary: rgba(255, 255, 255, 0.2);
  
  --shadow-primary: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-secondary: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.7);
  
  /* Typography Variables */
  --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  
  /* Messaging-specific Variables */
  --message-bubble-sent: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --message-bubble-received: var(--bg-secondary);
  --message-input-bg: var(--bg-card);
  --message-input-border: var(--border-secondary);
  --message-input-focus: var(--accent-primary);
  
  /* Animation Variables */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-bounce: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Glass Effect Variables */
  --glass-bg: rgba(0, 0, 0, 0.1);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(20px) saturate(180%);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  
  /* Role Badge Variables - Dark Theme */
  --role-athlete-bg: #1e3a8a;
  --role-athlete-text: #bfdbfe;
  --role-athlete-border: #3b82f6;
  --role-athlete-hover-bg: #1e40af;
  
  --role-parent-bg: #7c2d12;
  --role-parent-text: #fed7aa;
  --role-parent-border: #f97316;
  --role-parent-hover-bg: #9a3412;
  
  --role-organization-bg: #581c87;
  --role-organization-text: #e9d5ff;
  --role-organization-border: #a855f7;
  --role-organization-hover-bg: #6b21a8;
  
  --role-coach-bg: #064e3b;
  --role-coach-text: #d1fae5;
  --role-coach-border: #10b981;
  --role-coach-hover-bg: #065f46;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: linear-gradient(135deg, #f7fafc 0%, #edf2f7 25%, #e2e8f0 50%, #edf2f7 75%, #f7fafc 100%);
  --bg-secondary: #ffffff;
  --bg-tertiary: #f7fafc;
  --bg-card: #ffffff;
  --bg-navbar: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 252, 0.9));
  --bg-hover: rgba(0, 0, 0, 0.05);
  --bg-input: #ffffff;
  
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --text-on-accent: #ffffff;
  
  --accent-primary: #667eea;
  --accent-primary-hover: #5a67d8;
  --accent-secondary: #764ba2;
  --accent-danger: #e53e3e;
  
  --border-primary: rgba(102, 126, 234, 0.3);
  --border-secondary: rgba(0, 0, 0, 0.1);
  
  --shadow-primary: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-secondary: 0 4px 15px rgba(0, 0, 0, 0.05);
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.15);
  
  /* Light theme messaging variables */
  --message-bubble-sent: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --message-bubble-received: var(--bg-secondary);
  --message-input-bg: var(--bg-card);
  --message-input-border: var(--border-secondary);
  --message-input-focus: var(--accent-primary);
  
  /* Light theme glass effect */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-blur: blur(20px) saturate(180%);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  
  /* Role Badge Variables - Light Theme */
  --role-athlete-bg: #dbeafe;
  --role-athlete-text: #1e40af;
  --role-athlete-border: #3b82f6;
  --role-athlete-hover-bg: #bfdbfe;
  
  --role-parent-bg: #fed7aa;
  --role-parent-text: #9a3412;
  --role-parent-border: #f97316;
  --role-parent-hover-bg: #fdba74;
  
  --role-organization-bg: #e9d5ff;
  --role-organization-text: #6b21a8;
  --role-organization-border: #a855f7;
  --role-organization-hover-bg: #d8b4fe;
  
  --role-coach-bg: #d1fae5;
  --role-coach-text: #065f46;
  --role-coach-border: #10b981;
  --role-coach-hover-bg: #a7f3d0;
}

/* Dark Theme (Auth Pages - Black) */
[data-theme="dark"] .auth-page {
  --bg-primary: linear-gradient(135deg, #000000 0%, #1a1a1a 25%, #2d2d2d 50%, #1a1a1a 75%, #000000 100%);
  --bg-card: #1a1a1a;
  --bg-navbar: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(26, 26, 26, 0.9));
  
  --text-primary: #ffffff;
  --text-secondary: #d1d5db;
  
  --border-primary: rgba(0, 255, 136, 0.4);
  --border-secondary: rgba(255, 255, 255, 0.2);
}

/* Ensure profile page uses theme variables properly */
[data-theme="dark"] .profile-page {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-card: #1f1f1f;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-primary: rgba(255, 255, 255, 0.1);
  --shadow-primary: 0 4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .profile-page {
  --bg-primary: #f7fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --border-primary: rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Landing Page Theme Variables */
[data-theme="dark"] .landing-page {
  --landing-bg: linear-gradient(135deg, #000000 0%, #1a1a1a 25%, #2d2d2d 50%, #1a1a1a 75%, #000000 100%);
  --landing-text: #ffffff;
  --landing-text-secondary: #d1d5db;
  --landing-overlay: linear-gradient(135deg, rgba(15, 20, 25, 0.8), rgba(26, 35, 50, 0.7), rgba(45, 55, 72, 0.8));
  --landing-card-bg: linear-gradient(135deg, rgba(26, 26, 26, 0.4), rgba(0, 0, 0, 0.3));
  --landing-border: rgba(0, 255, 136, 0.3);
}

[data-theme="light"] .landing-page {
  --landing-bg: linear-gradient(135deg, #f7fafc 0%, #edf2f7 25%, #e2e8f0 50%, #edf2f7 75%, #f7fafc 100%);
  --landing-text: #1a202c;
  --landing-text-secondary: #4a5568;
  --landing-overlay: linear-gradient(135deg, rgba(247, 250, 252, 0.8), rgba(237, 242, 247, 0.7), rgba(226, 232, 240, 0.8));
  --landing-card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(247, 250, 252, 0.6));
  --landing-border: rgba(102, 126, 234, 0.3);
}

/* Smooth transitions for theme changes */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
/* Optimized CSS - Non-critical styles loaded after initial render */

/* === PERFORMANCE OPTIMIZATIONS === */
.optimized-component {
  transform: translateZ(0);
  will-change: transform;
}

/* Virtualized Feed Styles */
.virtualized-feed-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.virtualized-feed {
  width: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--border-primary) transparent;
}

.virtualized-feed::-webkit-scrollbar {
  width: 6px;
}

.virtualized-feed::-webkit-scrollbar-track {
  background: transparent;
}

.virtualized-feed::-webkit-scrollbar-thumb {
  background: var(--border-primary);
  border-radius: 3px;
}

/* Loading Skeleton */
.feed-item-loading {
  padding: 16px;
  border-bottom: 1px solid var(--border-primary);
}

.loading-skeleton {
  display: flex;
  gap: 12px;
  animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
}

.skeleton-content {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
}

.skeleton-line.short {
  width: 60%;
}

/* === ANIMATIONS === */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* === BUTTONS === */
.btn {
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 14px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-secondary);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
}

/* === MOBILE OPTIMIZATIONS === */
@media (hover: none) and (pointer: coarse) {
  .btn:hover {
    transform: none;
  }
  
  .btn {
    min-height: 44px; /* iOS touch target */
    padding: 12px 20px;
  }
  
  /* Disable expensive effects on mobile */
  * {
    -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
    box-shadow: none !important;
  }
  
  .optimized-component {
    will-change: auto;
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === HIGH CONTRAST === */
@media (prefers-contrast: high) {
  .btn {
    border: 2px solid currentColor;
  }
  
  .skeleton-line,
  .skeleton-avatar {
    background: var(--text-primary);
    opacity: 0.3;
  }
}
/* App-specific styles - Global styles are in global.css */

/* App container styles moved to global.css for consolidation */

/* Performance optimizations - Most moved to global.css */

/* Component-specific performance optimizations */
.fixed-message-input {
  will-change: transform;
  transform: translateZ(0);
}

@media (hover: none) {
  .fixed-message-input {
    -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
    background: var(--bg-navbar) !important;
  }
  
  /* Component-specific mobile optimizations */
  .post:hover,
  .message:hover,
  .friend-item:hover {
    transform: none !important;
  }
  
  .post-actions button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  
  .post,
  .chat-interface,
  .options-menu {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  }
  
  .post,
  .message,
  .friend-item {
    transition: background 0.1s ease !important;
  }
}

/* Optimize component scrolling */
.chat-messages,
.posts-feed {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
/* Index styles - Most styles moved to global.css for consolidation */
:root {
  scroll-behavior: smooth;
  --safe-area-top: env(safe-area-inset-top);
  --safe-area-bottom: env(safe-area-inset-bottom);
  --safe-area-left: env(safe-area-inset-left);
  --safe-area-right: env(safe-area-inset-right);
}

body {
  padding-top: env(safe-area-inset-top);
  padding-top: var(--safe-area-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-bottom: var(--safe-area-bottom);
  padding-left: env(safe-area-inset-left);
  padding-left: var(--safe-area-left);
  padding-right: env(safe-area-inset-right);
  padding-right: var(--safe-area-right);

  /* Native-like scrolling smoothness */
  -webkit-overflow-scrolling: touch;

  /* Remove tap delay on clickable elements */
  touch-action: manipulation;

  /* prevent bounce effect if desired, or keep it for native feel */
  overscroll-behavior-y: auto;

  /* Remove gray highlight on tap in iOS */
  -webkit-tap-highlight-color: transparent;
}

/* Tactile feedback for buttons */
button:active,
a:active,
[role="button"]:active {
  opacity: 0.7;
  transform: scale(0.98);
  transition: transform 0.1s;
}


code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}
