@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --gradient-6: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
  --gradient-fire: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  
  --sidebar-width: 300px;
  
  /* Light Mode */
  --bg-primary: #f0f4f8;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.25);
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --border-glass: rgba(255, 255, 255, 0.4);
  --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --bg-primary: #0a0e27;
  --bg-card: rgba(20, 25, 45, 0.9);
  --bg-glass: rgba(20, 25, 45, 0.4);
  --text-primary: #e2e8f0;
  --text-secondary: #a0aec0;
  --border-glass: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.5);
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(240, 147, 251, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(79, 172, 254, 0.2) 0%, transparent 50%);
  animation: backgroundShift 20s ease-in-out infinite;
  z-index: -1;
}

@keyframes backgroundShift {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.1) rotate(5deg); opacity: 0.8; }
}

.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.particle {
  position: absolute;
  background: var(--gradient-3);
  border-radius: 50%;
  opacity: 0.3;
  animation: float-particle 15s infinite ease-in-out;
}

.particle:nth-child(1) { width: 80px; height: 80px; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 60px; height: 60px; left: 70%; animation-delay: 3s; }
.particle:nth-child(3) { width: 100px; height: 100px; left: 50%; animation-delay: 6s; }
.particle:nth-child(4) { width: 50px; height: 50px; left: 30%; animation-delay: 9s; }
.particle:nth-child(5) { width: 70px; height: 70px; left: 80%; animation-delay: 12s; }

@keyframes float-particle {
  0%, 100% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.3; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-100px) scale(1); }
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-1);
  border-radius: 10px;
  border: 2px solid var(--bg-primary);
}

/* THEME TOGGLE */
.theme-toggle {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 2px solid var(--border-glass);
  border-radius: 50px;
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px var(--shadow-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
}

.theme-toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--gradient-1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}

.theme-toggle:hover::before {
  width: 200px;
  height: 200px;
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 48px var(--shadow-color);
}

.theme-toggle i {
  font-size: 20px;
  transition: all 0.3s;
}

.theme-toggle .fa-sun {
  color: #fbbf24;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.5));
}

.theme-toggle .fa-moon {
  color: #60a5fa;
  filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.5));
}

/* Theme Toggle Auth (top right) */
.theme-toggle-auth {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
}

/* Theme Toggle Mobile (bottom right) */
.theme-toggle-mobile {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: none;
}

/* Theme Toggle Desktop (in header) */
.theme-toggle-desktop {
  position: static;
  padding: 10px 16px;
}

/* SIDEBAR (Mobile Only) */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: none;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-glass);
  backdrop-filter: blur(30px);
  border-right: 2px solid var(--border-glass);
  box-shadow: 4px 0 40px var(--shadow-color);
  z-index: 999;
  display: none;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 2px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo i {
  font-size: 32px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-logo h2 {
  font-size: 24px;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-close {
  background: var(--bg-glass);
  border: 2px solid var(--border-glass);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 18px;
  transition: all 0.3s;
}

.sidebar-close:hover {
  transform: rotate(90deg);
  background: var(--gradient-fire);
  border-color: transparent;
  color: white;
}

.sidebar-user {
  padding: 24px 20px;
  border-bottom: 2px solid var(--border-glass);
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar i {
  font-size: 32px;
  color: white;
}

.user-details h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.user-details p {
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
}

.sidebar-item {
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.sidebar-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-1);
  transform: scaleY(0);
  transition: transform 0.3s;
}

.sidebar-item:hover,
.sidebar-item.active {
  background: var(--bg-glass);
}

.sidebar-item.active::before {
  transform: scaleY(1);
}

.sidebar-item i {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.sidebar-item span:first-of-type {
  flex: 1;
}

.sidebar-item .badge {
  background: var(--gradient-1);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-divider {
  height: 1px;
  background: var(--border-glass);
  margin: 12px 20px;
}

.sidebar-section {
  margin-top: 8px;
}

.sidebar-section-title {
  padding: 12px 20px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-footer {
  padding: 20px;
  border-top: 2px solid var(--border-glass);
}

/* HAMBURGER BUTTON (Mobile Only) */
.hamburger-btn {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 2px solid var(--border-glass);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 20px;
  transition: all 0.3s;
}

.hamburger-btn:hover {
  background: var(--gradient-1);
  border-color: transparent;
  color: white;
  transform: scale(1.05);
}

/* DESKTOP MENU (Desktop Only) */
.desktop-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}

.desktop-toolbar {
  display: flex;
  gap: 16px;
}

/* MOBILE ACTIONS (Mobile Only) */
.mobile-actions {
  display: none;
}

.btn-mobile-add {
  padding: 12px;
  width: 44px;
  height: 44px;
}

.btn-mobile-add i {
  margin: 0;
}

/* AUTHENTICATION */
.auth-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.auth-container::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: var(--gradient-1);
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  top: -300px;
  right: -300px;
  animation: pulse-glow 8s ease-in-out infinite;
}

.auth-container::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: var(--gradient-2);
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  bottom: -250px;
  left: -250px;
  animation: pulse-glow 8s ease-in-out infinite reverse;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.2); opacity: 0.5; }
}

.auth-box {
  background: var(--bg-glass);
  backdrop-filter: blur(30px);
  border: 2px solid var(--border-glass);
  border-radius: 30px;
  padding: 56px 48px;
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 80px var(--shadow-color);
  animation: slideUpScale 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpScale {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-box::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-1);
  border-radius: 30px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
}

.auth-box:hover::before {
  opacity: 0.2;
}

.auth-header {
  text-align: center;
  margin-bottom: 40px;
}

.auth-header img {
  width: 150px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 20px;
  animation: float-icon 3s ease-in-out infinite;
  filter: drop-shadow(0 10px 20px rgba(102, 126, 234, 0.3));
}

@keyframes float-icon {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(5deg); }
}

.auth-header h1 {
  font-size: 32px;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.auth-form h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.form-group label i {
  font-size: 16px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 2px solid var(--border-glass);
  border-radius: 16px;
  font-size: 15px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3), 0 8px 24px rgba(102, 126, 234, 0.2);
  transform: translateY(-2px);
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-switch a {
  color: transparent;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.auth-switch a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-1);
  transition: width 0.3s;
}

.auth-switch a:hover::after {
  width: 100%;
}

.error-message,
.success-message {
  padding: 16px 20px;
  border-radius: 16px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 500;
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  backdrop-filter: blur(10px);
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.error-message {
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.success-message {
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.error-message i,
.success-message i {
  font-size: 22px;
}

/* MAIN CONTAINER */
.main-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: var(--bg-glass);
  backdrop-filter: blur(30px);
  border-bottom: 2px solid var(--border-glass);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 10px 40px var(--shadow-color);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo img {
  width: 36px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rotate-pulse 4s ease-in-out infinite;
  filter: drop-shadow(0 5px 15px rgba(102, 126, 234, 0.3));
}

@keyframes rotate-pulse {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
}

.logo h1 {
  font-size: 26px;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info span {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 2px solid var(--border-glass);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 20px var(--shadow-color);
}

.user-info i {
  font-size: 20px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 32px;
  width: 100%;
}

.toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.search-box i {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 16px 20px 16px 55px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 2px solid var(--border-glass);
  border-radius: 20px;
  font-size: 15px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px var(--shadow-color);
}

.search-box input:focus {
  outline: none;
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3), 0 8px 32px rgba(102, 126, 234, 0.2);
  transform: translateY(-2px);
}

.filter-box select {
  padding: 16px 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 2px solid var(--border-glass);
  border-radius: 20px;
  font-size: 15px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px var(--shadow-color);
}

.filter-box select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3), 0 8px 32px rgba(102, 126, 234, 0.2);
  transform: translateY(-2px);
}

.passwords-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 28px;
}

.password-card {
  background: var(--bg-glass);
  backdrop-filter: blur(30px);
  border: 2px solid var(--border-glass);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 10px 40px var(--shadow-color);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  animation: cardFadeIn 0.6s ease;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.password-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.password-card:hover::before {
  transform: scaleX(1);
}

.password-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 60px var(--shadow-color), 0 0 40px rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.4);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-glass);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.service-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
}

.service-logo::after {
  content: '';
  position: absolute;
  inset: -4px;
  background: var(--gradient-1);
  border-radius: 18px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
}

.password-card:hover .service-logo {transform: scale(1.15) rotate(-10deg);
}

.password-card:hover .service-logo::after {
  opacity: 0.3;
}

.service-logo i {
  font-size: 28px;
  color: white;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.service-logo .logo-image {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
}

.title-text h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-emoji {
  font-size: 20px;
  animation: bounce-emoji 2s ease-in-out infinite;
}

@keyframes bounce-emoji {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.category-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  box-shadow: 0 4px 12px var(--shadow-color);
  backdrop-filter: blur(10px);
  border: 2px solid transparent;
  transition: all 0.3s;
}

.category-badge:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.category-badge.social { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.category-badge.email { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white; }
.category-badge.banking { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); color: white; }
.category-badge.work { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); color: white; }
.category-badge.shopping { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); color: white; }
.category-badge.entertainment { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%); color: white; }
.category-badge.other { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); color: #1a202c; }

.card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-field label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-field label i {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-field span,
.card-field a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 12px 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 2px solid var(--border-glass);
  border-radius: 12px;
  transition: all 0.3s;
}

.card-field a {
  color: transparent;
  background: var(--gradient-3);
  -webkit-background-clip: text;
  background-clip: text;
  text-decoration: none;
  font-weight: 600;
}

.card-field a:hover {
  transform: translateX(4px);
  border-color: rgba(79, 172, 254, 0.5);
}

.password-field {
  display: flex;
  gap: 10px;
}

.password-field input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 2px solid var(--border-glass);
  border-radius: 12px;
  font-size: 15px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: transparent;
  background-image: var(--gradient-4);
  -webkit-background-clip: text;
  background-clip: text;
}

.card-footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid var(--border-glass);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 100px 20px;
}

.empty-state i {
  font-size: 96px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
  animation: float-icon 3s ease-in-out infinite;
  filter: drop-shadow(0 10px 30px rgba(102, 126, 234, 0.3));
}

.empty-state p {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-glass);
  backdrop-filter: blur(40px);
  border: 2px solid var(--border-glass);
  border-radius: 30px;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 90px var(--shadow-color);
  animation: modalSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gradient-1);
  border-radius: 30px 30px 0 0;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 36px;
  border-bottom: 2px solid var(--border-glass);
}

.modal-header h2 {
  font-size: 26px;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-close {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 2px solid var(--border-glass);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-primary);
  font-size: 20px;
}

.btn-close:hover {
  transform: rotate(90deg) scale(1.1);
  background: var(--gradient-fire);
  border-color: transparent;
  color: white;
}

.modal-body {
  padding: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.password-input-group {
  display: flex;
  gap: 10px;
}

.password-input-group input {
  flex: 1;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
}

/* BUTTONS */
.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 8px 24px var(--shadow-color);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.8s, height 0.8s;
}

.btn:active::before {
  width: 400px;
  height: 400px;
}

.btn i {
  font-size: 18px;
  transition: transform 0.3s;
}

.btn:hover i {
  transform: scale(1.2);
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  border: 2px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  border: 2px solid var(--border-glass);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(102, 126, 234, 0.5);
}

.btn-add {
  background: var(--gradient-4);
  color: white;
}

.btn-add:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 40px rgba(67, 233, 123, 0.5);
}

.btn-edit {
  flex: 1;
  background: var(--gradient-3);
  color: white;
}

.btn-edit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(79, 172, 254, 0.5);
}

.btn-delete {
  flex: 1;
  background: var(--gradient-fire);
  color: white;
}

.btn-delete:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(238, 90, 111, 0.5);
}

.btn-logout {
  background: var(--gradient-fire);
  color: white;
}

.btn-logout:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 40px rgba(238, 90, 111, 0.5);
}

.btn-icon {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 2px solid var(--border-glass);
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon i {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 16px;
}

.btn-icon:hover {
  transform: scale(1.1) rotate(5deg);
  border-color: rgba(102, 126, 234, 0.5);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* NOTIFICATIONS */
.notification {
  position: fixed;
  bottom: 28px;
  right: 28px;
  padding: 18px 28px;
  border-radius: 20px;
  box-shadow: 0 20px 60px var(--shadow-color);
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  font-size: 15px;
  z-index: 2000;
  animation: slideInRight 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  min-width: 340px;
  backdrop-filter: blur(20px);
  border: 2px solid;
}

@keyframes slideInRight {
  from {
    transform: translateX(500px) rotate(10deg);
    opacity: 0;
  }
  to {
    transform: translateX(0) rotate(0deg);
    opacity: 1;
  }
}

.notification i {
  font-size: 24px;
  animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.notification.success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.notification.error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
}

.notification.info {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

/* Desktop (> 768px) - Show everything */
@media (min-width: 769px) {
  .hamburger-btn {
    display: none;
  }
  
  .mobile-actions {
    display: none;
  }
  
  .sidebar {
    display: none;
  }
  
  .sidebar-overlay {
    display: none;
  }
  
  .theme-toggle-mobile {
    display: none;
  }
  
  .desktop-menu {
    display: flex;
  }
  
  .desktop-toolbar {
    display: flex;
  }
}

/* Mobile (≤ 768px) - Show sidebar menu */
@media (max-width: 768px) {
  .particles {
    display: none;
  }

  /* Show mobile elements */
  .hamburger-btn {
    display: flex;
  }

  .mobile-actions {
    display: flex;
  }

  .sidebar {
    display: flex;
  }

  .sidebar-overlay {
    display: block;
  }

  .theme-toggle-mobile {
    display: flex;
  }

  /* Hide desktop elements */
  .desktop-menu {
    display: none;
  }

  .desktop-toolbar {
    display: none;
  }

  .theme-toggle-desktop {
    display: none;
  }

  /* Adjustments */
  .theme-toggle-auth {
    top: 16px;
    right: 16px;
    padding: 10px 16px;
  }

  .logo h1 {
    font-size: 20px;
  }

  .logo i {
    font-size: 28px;
  }

  .header-content {
    padding: 0 20px;
  }

  .content {
    padding: 28px 20px;
  }

  .passwords-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .toolbar {
    flex-direction: column;
  }
  
  .search-box {
    width: 100%;
    min-width: auto;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .auth-box {
    padding: 40px 28px;
  }

  .auth-header h1 {
    font-size: 28px;
  }

  .auth-header i {
    font-size: 64px;
  }

  .auth-form h2 {
    font-size: 24px;
  }
  
  .modal-body {
    padding: 28px 24px;
  }

  .modal-header {
    padding: 24px;
  }
  
  .notification {
    bottom: 90px;
    right: 20px;
    left: 20px;
    min-width: auto;
  }

  .card-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .category-badge {
    align-self: flex-start;
  }

  .password-card {
    padding: 24px;
  }

  .card-footer {
    flex-direction: column;
  }

  .btn-edit,
  .btn-delete {
    width: 100%;
  }

  .sidebar {
    width: 85%;
    max-width: 320px;
  }
}

@media (max-width: 480px) {
  .auth-box {
    padding: 32px 20px;
  }

  .auth-header i {
    font-size: 56px;
  }

  .auth-header h1 {
    font-size: 24px;
  }

  .passwords-grid {
    gap: 16px;
  }

  .password-card {
    padding: 20px;
  }

  .service-logo {
    width: 48px;
    height: 48px;
  }

  .service-logo i {
    font-size: 24px;
  }

  .title-text h3 {
    font-size: 18px;
  }

  .logo h1 {
    display: none;
  }

  .modal {
    border-radius: 20px;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-body {
    padding: 20px;
  }
}

@media (min-width: 1024px) {
  .passwords-grid {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  }
}