/* COMPLETE STYLES WITH DESKTOP SUPPORT */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh; color: #1f2937; line-height: 1.6;
}

.app-container { min-height: 100vh; display: flex; flex-direction: column; max-width: 1200px; margin: 0 auto; }
.content { 
  flex: 1; padding: 1.5rem; padding-bottom: 6rem; width: 100%; 
}

.header {
  background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.1); padding: 1.5rem;
  position: sticky; top: 0; z-index: 100;
}
.header-content { 
  max-width: 1200px; margin: 0 auto; display: flex; 
  justify-content: space-between; align-items: center; 
}
.header h1 { 
  font-size: clamp(1.3rem, 4vw, 2rem); font-weight: 800; 
  background: linear-gradient(135deg, #3b82f6, #1e40af); 
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; 
}
.stats-badge { 
  background: #3b82f6; color: white; padding: 0.5rem 1rem; 
  border-radius: 9999px; font-size: 0.875rem; font-weight: 600; 
}
.back-link { color: #3b82f6; text-decoration: none; font-weight: 500; }
.export-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.card {
  background: rgba(255,255,255,0.9); backdrop-filter: blur(20px);
  border-radius: 24px; padding: 2rem; margin-bottom: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.2);
}
.card h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }
.card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.25rem; }

.form-group { margin-bottom: 1.5rem; }
.form-group label { 
  display: block; font-weight: 600; margin-bottom: 0.75rem; 
  color: #374151; font-size: 1rem; 
}
.form-group input, .form-group select { 
  width: 100%; padding: 1rem 1.25rem; border: 2px solid #e5e7eb; 
  border-radius: 16px; font-size: 1rem; transition: all 0.3s; 
  background: rgba(255,255,255,0.9);
}
.form-group input:focus, .form-group select:focus { 
  outline: none; border-color: #3b82f6; 
  box-shadow: 0 0 0 4px rgba(59,130,246,0.1); 
}

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.add-form input { margin-bottom: 1rem; }

.btn-primary, .btn-secondary {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  color: white; border: none; padding: 1rem 2rem; border-radius: 16px;
  font-weight: 600; font-size: 1rem; cursor: pointer; transition: all 0.3s;
  box-shadow: 0 10px 20px rgba(59,130,246,0.3);
}
.btn-secondary { background: linear-gradient(135deg, #6b7280, #4b5563); box-shadow: 0 10px 20px rgba(107,114,128,0.3); }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 15px 30px rgba(0,0,0,0.2); }
.btn-danger {
  background: #ef4444; color: white; border: none;
  padding: 0.75rem 1.25rem; border-radius: 12px; font-size: 0.875rem;
  cursor: pointer;
}
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }
.full-width { width: 100%; }

.chart-header { 
  display: flex; justify-content: space-between; align-items: center; 
  margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; 
}
.chart-header select { 
  padding: 0.75rem 1.25rem; border: 2px solid #e5e7eb; 
  border-radius: 12px; background: white; font-weight: 500; 
}

.stats-grid, .summary-grid { 
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); 
  gap: 1.5rem; margin-top: 2rem; 
}
.stat-card {
  text-align: center; padding: 2rem 1.5rem; border-radius: 20px;
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(30,64,175,0.15));
  border: 1px solid rgba(59,130,246,0.3);
}
.stat-card strong { font-size: 2.5rem; font-weight: 800; color: #1e40af; display: block; }

canvas { max-height: 350px; width: 100% !important; height: auto !important; }
.full-chart { height: 300px !important; }

.recent-list { max-height: 400px; overflow-y: auto; }
.recent-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem; background: rgba(248,250,252,0.8); 
  border-radius: 16px; margin-bottom: 1rem; border-left: 4px solid #3b82f6;
}
.recent-watch { font-weight: 700; color: #1f2937; font-size: 1.1rem; }

.tab-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.98); backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,0,0,0.1); padding: 1rem 0;
  display: flex; max-width: 1200px; margin: 0 auto;
}
.tab { 
  flex: 1; text-align: center; padding: 1rem 1rem; 
  text-decoration: none; color: #6b7280; transition: all 0.3s;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.tab.active { color: #3b82f6; }
.tab svg { width: 28px; height: 28px; fill: currentColor; }

.inventory-list { display: flex; flex-direction: column; gap: 1.5rem; }
.inventory-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.75rem; background: rgba(255,255,255,0.7); 
  border-radius: 20px; border-left: 5px solid #3b82f6; cursor: pointer;
  transition: all 0.3s;
}
.inventory-item:hover { transform: translateY(-2px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.item-main { flex: 1; }
.item-name { font-weight: 800; font-size: 1.25rem; margin-bottom: 0.5rem; }
.item-meta { display: flex; gap: 1.5rem; font-size: 0.95rem; color: #6b7280; }

.empty-state { 
  text-align: center; padding: 3rem 2rem; color: #9ca3af; 
  font-style: italic; font-size: 1.1rem;
}
.hidden { display: none; }

@media (max-width: 768px) {
  .content { padding: 1rem; }
  .card { padding: 1.5rem; margin-bottom: 1.5rem; }
  .form-row { grid-template-columns: 1fr !important; gap: 1rem; }
  .tab-nav { padding: 0.75rem 0; }
  .inventory-item { flex-direction: column; text-align: center; gap: 1rem; }
  .inventory-item .btn-danger { align-self: flex-end; }
}

@media (min-width: 1200px) {
  .content { padding: 2rem; }
  .card { padding: 2.5rem; }
  .stats-grid, .summary-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
