/*
 * User-Facing Application Styles
 *
 * This file contains all styles for user-facing pages (dashboard, skills, credits, etc.)
 * For admin-specific styles, see admin_only.css
 */

/* ========================================
   Mobile Touch Optimization
   ======================================== */

* {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.overflow-auto,
.overflow-y-auto,
.overflow-x-auto,
.overflow-scroll {
  touch-action: pan-y pan-x;
}

/* ========================================
   Background & Layout
   ======================================== */

/* Note: Background image is set via inline style in layout due to asset pipeline */
html {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100svh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: transparent;
  min-height: 100svh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  padding-bottom: env(safe-area-inset-bottom);
}

.page-container {
  min-height: 100svh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}

/* ========================================
   Soft UI Components
   ======================================== */

.soft-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.2, 0.82, 0.165, 1);
}

.shadow-soft-xl {
  box-shadow: 0 20px 27px 0 rgba(0, 0, 0, 0.05);
}

/* ========================================
   Navigation Components
   ======================================== */

.nav-glass {
  background: white;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========================================
   Icon Containers
   ======================================== */

.icon-container-sm {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.icon-container {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Gradient Utilities
   ======================================== */

.bg-gradient-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.bg-gradient-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.bg-gradient-info {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.bg-gradient-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.bg-gradient-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.text-gradient-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   Skill Tree Specific
   ======================================== */

[data-skill-tree-target="canvas"] {
  touch-action: none;
}

.locked-skill {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   Credit System Components
   ======================================== */

.credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.credit-transaction {
  transition: all 0.2s ease-in-out;
}

.credit-transaction:hover {
  transform: translateX(4px);
}

/* ========================================
   Tab Components
   ======================================== */

.tab-button {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
  cursor: pointer;
}

.tab-button.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.tab-button:not(.active) {
  background: transparent;
  color: #6b7280;
}

.tab-button:not(.active):hover {
  background: #f3f4f6;
}

/* ========================================
   Mobile Navigation
   ======================================== */

.mobile-nav-overlay {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.2);
}

.mobile-nav-panel {
  height: 100svh;
  height: 100dvh;
  height: -webkit-fill-available;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ========================================
   Utility Classes
   ======================================== */

.glass-effect {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hover-lift {
  transition: transform 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
}
