@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS Custom Properties ===== */
:root {
  --bg-primary: #FAF9F6; /* Off-white/Beige */
  --bg-secondary: #F2EFE9; /* Slightly darker beige */
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.6);
  --bg-glass-hover: rgba(255, 255, 255, 0.9);
  --border-glass: rgba(0, 0, 0, 0.06);
  --border-glass-hover: rgba(0, 0, 0, 0.12);

  --text-primary: #2C2C2C; /* Dark gray */
  --text-secondary: #666666;
  --text-muted: #999999;

  --accent-gradient: #A1C6EA; /* Baby blue */
  --accent-gradient-hover: #8AB4DD;
  --accent-solid: #A1C6EA;
  --accent-light: #C4DFF6;

  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(161, 198, 234, 0.4);

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 70px;
}



a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-solid);
}

img {
  max-width: 100%;
  display: block;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  transition: background var(--transition-normal);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

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

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-glass);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  outline: none;
}

.btn-primary {
  background: var(--accent-solid);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-glass-hover);
}

.btn-outline:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-light);
  color: var(--accent-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

/* ===== Glass Card ===== */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-normal);
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-glow);
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-solid);
  box-shadow: 0 0 0 3px rgba(161, 198, 234, 0.3);
  background: #ffffff;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}

.form-select:focus {
  border-color: var(--accent-solid);
  box-shadow: 0 0 0 3px rgba(161, 198, 234, 0.3);
}

.form-select option {
  background: #ffffff;
  color: var(--text-primary);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 6rem 2rem 4rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 2rem;
  animation: fadeInDown 0.8s ease;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1.5px;
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero h1 span {
  color: var(--accent-solid);
  font-style: italic;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  animation: fadeInUp 0.8s ease 0.3s both;
}

/* ===== Features Section ===== */
.features {
  position: relative;
  z-index: 1;
  padding: 4rem 2rem 6rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.feature-card {
  padding: 2rem;
  text-align: center;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Auth Pages ===== */
.auth-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 6rem 2rem 4rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  animation: fadeInUp 0.6s ease;
}

.auth-card h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.auth-card .subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.auth-card .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-light);
  margin-bottom: 1rem;
  margin-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-glass);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* AI Analysis Info on Photo Cards */
.photo-ai-info {
  position: absolute;
  top: 3rem;
  right: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 4;
}

.ai-tag {
  padding: 0.15rem 0.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--border-glass);
}

.ai-tag.color-tag {
  background: rgba(161, 198, 234, 0.2);
}

.ai-tag.style-tag {
  background: rgba(161, 198, 234, 0.4);
}

.ai-tag.analyzing {
  background: rgba(245, 158, 11, 0.2);
  animation: pulse 2s infinite;
}

/* ===== Wardrobe Page ===== */
.wardrobe-container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  min-height: 100vh;
}

.wardrobe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.wardrobe-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.wardrobe-header h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.photo-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-glass);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  border: 1px solid var(--border-glass);
}

/* Upload Area */
.upload-area {
  border: 2px dashed var(--border-glass-hover);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  margin-bottom: 2.5rem;
  background: var(--bg-glass);
  position: relative;
  overflow: hidden;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-glow);
}

.upload-area.drag-over {
  transform: scale(1.01);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.upload-area h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.upload-area p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Progress Bar */
.upload-progress {
  display: none;
  margin-top: 1rem;
}

.upload-progress.active {
  display: block;
}

.progress-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 100px;
  transition: width 0.3s ease;
  width: 0%;
}

/* Photo Grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.photo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  animation: fadeInUp 0.4s ease;
}

.photo-card:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.photo-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #F4F1EA;
  overflow: hidden;
  flex-shrink: 0;
}

.photo-card-media img,
.photo-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  cursor: pointer;
  transition: transform var(--transition-slow);
}

.photo-card:hover .photo-card-media img {
  transform: scale(1.03);
}

.photo-corner-delete-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.92);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  color: #ffffff;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.photo-corner-delete-btn:hover {
  background: #dc2626;
  transform: scale(1.08);
}

.photo-smart-meta {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  z-index: 4;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  pointer-events: none;
}

.photo-meta-color {
  background: rgba(30, 30, 28, 0.8);
  color: #FAF8F5;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-meta-scale {
  background: rgba(255, 255, 255, 0.92);
  color: #1E1E1C;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.photo-overlay {
  position: relative;
  background: #ffffff;
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.65rem;
  opacity: 1;
  flex: 0 0 auto;
  min-width: 0;
}

.photo-info {
  width: 100%;
  min-width: 0;
}

.photo-info .filename {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-note-line {
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-info .date {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.photo-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  width: 100%;
  margin-top: auto;
}

.photo-recommend-btn {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 0.65rem;
  border-radius: 9px;
  background: #1E1E1C;
  border: none;
  color: #FAF8F5;
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.photo-recommend-btn:hover {
  background: #333330;
}

.photo-delete-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #dc2626;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.photo-delete-btn:hover {
  background: var(--error);
  border-color: var(--error);
  color: #ffffff;
  transform: scale(1.05);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.9rem;
}

/* ===== Toast Notifications ===== */
.toast-container {
  position: fixed;
  top: 85px;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.25rem;
  min-width: 280px;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  font-size: 0.88rem;
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--error);
}

.toast.info {
  border-left: 3px solid var(--accent-solid);
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  color: var(--text-primary);
}

/* ===== Loading Spinner ===== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 26, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  backdrop-filter: blur(4px);
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9997;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: pointer;
  animation: fadeIn 0.3s ease;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Category Tabs ===== */
.category-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-glass) transparent;
}

.category-tabs::-webkit-scrollbar {
  height: 4px;
}

.category-tabs::-webkit-scrollbar-track {
  background: transparent;
}

.category-tabs::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 100px;
}

.category-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
  flex-shrink: 0;
}

.category-tab:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
  color: var(--text-primary);
}

.category-tab.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #000000;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.category-tab .tab-icon {
  font-size: 1.1rem;
}

.category-tab .tab-label {
  font-size: 0.85rem;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.25s ease;
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.3s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.modal-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-glass-hover);
  color: var(--text-secondary);
  font-size: 1.2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.modal-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ===== Category Selection Grid ===== */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.category-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
}

.category-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #ffffff;
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.category-option:active {
  transform: translateY(0);
}

.category-emoji {
  font-size: 2.2rem;
}

.category-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.category-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

/* ===== Selected Category Badge (in upload modal) ===== */
.selected-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  background: var(--accent-gradient);
  color: white;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

/* ===== Photo Category Badge (on photo cards) ===== */
.photo-category-badge {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  max-width: calc(100% - 52px);
  padding: 0.2rem 0.55rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
  color: white;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-category-badge span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  
  .navbar::-webkit-scrollbar {
    display: none; /* Hide scrollbar for cleaner look */
  }
  
  .navbar-nav {
    flex-wrap: nowrap;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .auth-card .form-row {
    grid-template-columns: 1fr;
  }

  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }

  .wardrobe-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-card .form-row {
    grid-template-columns: 1fr !important;
  }

  .category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .category-option {
    padding: 1rem 0.75rem;
  }

  .modal {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .navbar-nav .nav-link {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }

  .wardrobe-container {
    padding: 5.2rem 0.85rem 3rem;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .photo-overlay {
    padding: 0.5rem 0.55rem;
    gap: 0.4rem;
  }

  .photo-recommend-btn {
    height: 30px;
    padding: 0 0.45rem;
    font-size: 0.7rem;
  }

  .photo-delete-btn {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }

  .photo-corner-delete-btn {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    top: 0.4rem;
    right: 0.4rem;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }
}

/* Notifications */
.notification-btn { position: relative; cursor: pointer; }
.notification-badge { position: absolute; top: -5px; right: -5px; background: red; color: white; font-size: 0.6rem; font-weight: bold; padding: 2px 5px; border-radius: 10px; }
.notification-dropdown { position: absolute; top: 40px; right: 0; width: 320px; max-height: 400px; overflow-y: auto; background: var(--bg-card); border: 1px solid var(--border-glass); border-radius: 8px; box-shadow: var(--shadow-sm); display: none; flex-direction: column; z-index: 1001; }
.notification-dropdown.active { display: flex; }
.notif-item { display: flex; gap: 10px; align-items: center; padding: 12px; border-bottom: 1px solid var(--border-glass); text-decoration: none; color: var(--text-primary); font-size: 0.85rem; }
.notif-item:hover { background: var(--bg-secondary); }
.notif-item img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.notif-item.unread { background: rgba(0, 122, 255, 0.05); }

/* Notifications */
.notification-btn { position: relative; cursor: pointer; }
.notification-badge { position: absolute; top: -5px; right: -5px; background: red; color: white; font-size: 0.6rem; font-weight: bold; padding: 2px 5px; border-radius: 10px; }
.notification-dropdown { position: absolute; top: 40px; right: 0; width: 320px; max-height: 400px; overflow-y: auto; background: var(--bg-card); border: 1px solid var(--border-glass); border-radius: 8px; box-shadow: var(--shadow-sm); display: none; flex-direction: column; z-index: 1001; }
.notification-dropdown.active { display: flex; }
.notif-item { display: flex; gap: 10px; align-items: center; padding: 12px; border-bottom: 1px solid var(--border-glass); text-decoration: none; color: var(--text-primary); font-size: 0.85rem; }
.notif-item:hover { background: var(--bg-secondary); }
.notif-item img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.notif-item.unread { background: rgba(0, 122, 255, 0.05); }

.profile-tabs { display: flex; justify-content: center; gap: 2rem; margin: 2rem 0 1rem; border-bottom: 1px solid var(--border-glass); }
.profile-tab { padding: 0.5rem 1rem; cursor: pointer; color: var(--text-secondary); font-weight: 500; border-bottom: 2px solid transparent; transition: all 0.2s; }
.profile-tab:hover { color: var(--text-primary); }
.profile-tab.active { color: var(--text-primary); border-bottom: 2px solid var(--text-primary); }

.feed-actions { display: flex; gap: 1rem; margin-top: 10px; }
.feed-action-btn { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--text-primary); display: flex; align-items: center; gap: 5px; }
.comments-section { margin-top: 15px; border-top: 1px solid var(--border-glass); padding-top: 10px; font-size: 0.9rem; }
.comments-list { max-height: 150px; overflow-y: auto; margin-bottom: 10px; }
.comment-item { margin-bottom: 5px; }
.comment-item .author { font-weight: 600; margin-right: 5px; }
.comment-input-area { display: flex; gap: 10px; }
.comment-input { flex: 1; padding: 8px 12px; border: 1px solid var(--border-glass); border-radius: 20px; background: var(--bg-card); color: var(--text-primary); }
/* Cropper JS Overrides */
.cropper-container { max-width: 100%; }
.cropper-view-box, .cropper-face { border-radius: 4px; }

.feed-layout { display: flex; max-width: 1000px; margin: 0 auto; gap: 2rem; align-items: flex-start; padding: 0 1rem; }
.feed-container { flex: 1; max-width: 600px; margin-top: 2rem; margin-bottom: 2rem; }
.showcase-panel { width: 220px; margin-top: 2rem; position: sticky; top: 80px; background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border-glass); padding: 15px; text-align: center; box-shadow: var(--shadow-sm); }
@media (max-width: 800px) { .feed-layout { flex-direction: column-reverse; align-items: center; } .feed-container { max-width: 100%; width: 100%; } .showcase-panel { position: static; width: 100%; max-width: 400px; margin-top: 1rem; } }

/* App Footer */
.app-footer {
  margin-top: 4rem;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border-glass);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}
.app-footer .footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}
.app-footer .footer-brand {
  font-size: 0.95rem;
  color: var(--text-primary);
}
.app-footer .footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0.25rem 0;
}
.app-footer .footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color var(--transition-fast);
}
.app-footer .footer-links a:hover {
  color: var(--accent-gradient-hover);
  text-decoration: underline;
}
.app-footer .footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}
/* Sub-Category Pills Bar */
.sub-category-tabs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
  margin-bottom: 0.5rem;
  overflow-x: auto;
  padding: 0.35rem 0.2rem;
  animation: fadeInSub 0.2s ease-out;
}

@keyframes fadeInSub {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass-hover);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.sub-tab:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-solid);
  color: var(--text-primary);
}

.sub-tab.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.sub-tab.active i {
  color: #FFFFFF;
}

/* Google AdSense Responsive Banner Slot */
.ad-banner-slot {
  max-width: 960px;
  margin: 2rem auto;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  overflow: hidden;
}
.ad-banner-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ad-fallback-horizontal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  text-align: left;
  margin-top: 0.5rem;
}
.ad-fallback-horizontal img {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.ad-fallback-info {
  flex: 1;
}
.ad-fallback-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.ad-fallback-info p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
@media (max-width: 600px) {
  .ad-fallback-horizontal {
    flex-direction: column;
    text-align: center;
  }
}
