:root {
  --primary-color: #8b5cf6;
  --primary-hover: #7c3aed;
  --secondary-color: #6366f1;
  --background-color: #0a0a0f;
  --card-bg: rgba(30, 30, 45, 0.9);
  --card-border: rgba(139, 92, 246, 0.2);
  --text-color: #ffffff;
  --text-secondary: #9ca3af;
  --success-color: #22c55e;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
}

[data-theme="dark"] {
  --primary-color: #8b5cf6;
  --primary-hover: #7c3aed;
  --secondary-color: #6366f1;
  --background-color: #0a0a0f;
  --card-bg: rgba(30, 30, 45, 0.9);
  --card-border: rgba(139, 92, 246, 0.2);
  --text-color: #ffffff;
  --text-secondary: #9ca3af;
}

[data-theme="purple"] {
  --primary-color: #8b5cf6;
  --primary-hover: #7c3aed;
  --secondary-color: #a855f7;
  --background-color: #0f0f1f;
  --card-bg: rgba(30, 25, 50, 0.9);
  --card-border: rgba(168, 85, 247, 0.3);
  --text-color: #ffffff;
  --text-secondary: #c4b5fd;
}

[data-theme="white"] {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --secondary-color: #60a5fa;
  --background-color: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-border: rgba(59, 130, 246, 0.2);
  --text-color: #1e293b;
  --text-secondary: #64748b;
}

[data-theme="yellow"] {
  --primary-color: #f59e0b;
  --primary-hover: #d97706;
  --secondary-color: #fbbf24;
  --background-color: #1c1917;
  --card-bg: rgba(41, 37, 36, 0.9);
  --card-border: rgba(245, 158, 11, 0.3);
  --text-color: #ffffff;
  --text-secondary: #fcd34d;
}

[data-theme="pink"] {
  --primary-color: #ec4899;
  --primary-hover: #db2777;
  --secondary-color: #f472b6;
  --background-color: #1f1f2f;
  --card-bg: rgba(45, 35, 45, 0.9);
  --card-border: rgba(236, 72, 153, 0.3);
  --text-color: #ffffff;
  --text-secondary: #f9a8d4;
}

[data-theme="grey"] {
  --primary-color: #6b7280;
  --primary-hover: #4b5563;
  --secondary-color: #9ca3af;
  --background-color: #111827;
  --card-bg: rgba(31, 41, 55, 0.95);
  --card-border: rgba(156, 163, 175, 0.3);
  --text-color: #f9fafb;
  --text-secondary: #d1d5db;
}

[data-theme="black"] {
  --primary-color: #ffffff;
  --primary-hover: #e5e5e5;
  --secondary-color: #9ca3af;
  --background-color: #000000;
  --card-bg: rgba(18, 18, 18, 0.95);
  --card-border: rgba(255, 255, 255, 0.15);
  --text-color: #ffffff;
  --text-secondary: #a3a3a3;
}
[data-theme="cyan"] {
  --primary-color: #06b6d4;
  --primary-hover: #0891b2;
  --secondary-color: #22d3ee;
  --background-color: #0f1f23;
  --card-bg: rgba(25, 45, 50, 0.9);
  --card-border: rgba(6, 182, 212, 0.3);
  --text-color: #ffffff;
  --text-secondary: #67e8f9;
}
[data-theme="green-fluo"] {
  --primary-color: #00ff00;
  --primary-hover: #00dd00;
  --secondary-color: #39ff14;
  --background-color: #001a00;
  --card-bg: rgba(0, 40, 0, 0.95);
  --card-border: rgba(0, 255, 0, 0.4);
  --text-color: #00ff00;
  --text-secondary: #66ff66;
}

[data-theme="cyberpunk"] {
  --primary-color: #ff00ff;
  --primary-hover: #dd00dd;
  --secondary-color: #00ffff;
  --background-color: #0d001a;
  --card-bg: rgba(26, 0, 39, 0.95);
  --card-border: rgba(255, 0, 255, 0.5);
  --text-color: #ffffff;
  --text-secondary: #00ffff;
}

[data-theme="sunset"] {
  --primary-color: #ff6b35;
  --primary-hover: #ff5722;
  --secondary-color: #ffa726;
  --background-color: #1a0a0f;
  --card-bg: rgba(50, 20, 30, 0.95);
  --card-border: rgba(255, 107, 53, 0.4);
  --text-color: #ffffff;
  --text-secondary: #ffab91;
}

[data-theme="neon-blue"] {
  --primary-color: #00d4ff;
  --primary-hover: #00b8e6;
  --secondary-color: #0099ff;
  --background-color: #000a1a;
  --card-bg: rgba(0, 20, 40, 0.95);
  --card-border: rgba(0, 212, 255, 0.5);
  --text-color: #ffffff;
  --text-secondary: #66e0ff;
}

[data-theme="ocean"] {
  --primary-color: #1fa2ff;
  --primary-hover: #0e79c9;
  --secondary-color: #12c2e9;
  --background-color: #00111a;
  --card-bg: rgba(0, 25, 35, 0.95);
  --card-border: rgba(30, 160, 200, 0.35);
  --text-color: #e0faff;
  --text-secondary: #9be8ff;
}

[data-theme="bloodmoon"] {
  --primary-color: #ff1e1e;
  --primary-hover: #d41414;
  --secondary-color: #ff6b6b;
  --background-color: #0a0000;
  --card-bg: rgba(30, 0, 0, 0.95);
  --card-border: rgba(255, 30, 30, 0.35);
  --text-color: #ffecec;
  --text-secondary: #ffb3b3;
}

[data-theme="forest"] {
  --primary-color: #34d399;
  --primary-hover: #059669;
  --secondary-color: #6ee7b7;
  --background-color: #0b1a13;
  --card-bg: rgba(15, 40, 30, 0.95);
  --card-border: rgba(52, 211, 153, 0.3);
  --text-color: #e6fff5;
  --text-secondary: #99f6e4;
}

[data-theme="iceberg"] {
  --primary-color: #b3eaff;
  --primary-hover: #7dd9ff;
  --secondary-color: #e0f7ff;
  --background-color: #0a1626;
  --card-bg: rgba(20, 35, 55, 0.9);
  --card-border: rgba(125, 217, 255, 0.35);
  --text-color: #e8faff;
  --text-secondary: #b5e7ff;
}

[data-theme="sakura"] {
  --primary-color: #ff9bb3;
  --primary-hover: #ff7a96;
  --secondary-color: #ffd6e0;
  --background-color: #fff5f8;
  --card-bg: rgba(255, 236, 244, 0.95);
  --card-border: rgba(255, 155, 179, 0.35);
  --text-color: #3b3b55;
  --text-secondary: #7d7d9b;
}

[data-theme="bronze"] {
  --primary-color: #cd7f32;
  --primary-hover: #b56924;
  --secondary-color: #e0b882;
  --background-color: #1a1209;
  --card-bg: rgba(40, 25, 10, 0.95);
  --card-border: rgba(205, 127, 50, 0.35);
  --text-color: #ffe8cc;
  --text-secondary: #f4d6a8;
}

[data-theme="aurora"] {
  --primary-color: #7ef9ff;
  --primary-hover: #4ecce0;
  --secondary-color: #adffcf;
  --background-color: #020d16;
  --card-bg: rgba(10, 25, 40, 0.95);
  --card-border: rgba(126, 249, 255, 0.4);
  --text-color: #e6fff9;
  --text-secondary: #9fffe6;
}

[data-theme="terminal"] {
  --primary-color: #33ff33;
  --primary-hover: #1aff1a;
  --secondary-color: #66ff66;
  --background-color: #000000;
  --card-bg: rgba(0, 20, 0, 0.95);
  --card-border: rgba(51, 255, 51, 0.25);
  --text-color: #33ff33;
  --text-secondary: #66ff66;
}

[data-theme="candy"] {
  --primary-color: #ff5ec9;
  --primary-hover: #e84fb2;
  --secondary-color: #7cf5ff;
  --background-color: #1f0820;
  --card-bg: rgba(40, 10, 45, 0.9);
  --card-border: rgba(255, 94, 201, 0.35);
  --text-color: #ffe6f7;
  --text-secondary: #c8f9ff;
}

[data-theme="arctic-white"] {
  --primary-color: #4da3ff;           
  --primary-hover: #1f8bff;         
  --secondary-color: #b6d9ff;       
  --background-color: #f8fbff;      
  --card-bg: rgba(255, 255, 255, 0.9); 
  --card-border: rgba(77, 163, 255, 0.25);
  --text-color: #1e293b;             
  --text-secondary: #64748b;        
}

[data-theme="silver"] {
  --primary-color: #cfd5da;
  --primary-hover: #b8bec3;
  --secondary-color: #e7ebee;
  --background-color: #101214;
  --card-bg: rgba(30, 35, 40, 0.9);
  --card-border: rgba(207, 213, 218, 0.3);
  --text-color: #f1f3f4;
  --text-secondary: #c7ccd1;
}

[data-theme="matrix"] {
  --primary-color: #00ff41;
  --primary-hover: #00dd38;
  --secondary-color: #00aa00;
  --background-color: #000000;
  --card-bg: rgba(0, 15, 0, 0.98);
  --card-border: rgba(0, 255, 65, 0.4);
  --text-color: #00ff41;
  --text-secondary: #00aa00;
}

[data-theme="frost"] {
  --primary-color: #7dd3fc;
  --primary-hover: #38bdf8;
  --secondary-color: #bae6fd;
  --background-color: #0d1b2a;
  --card-bg: rgba(13, 27, 42, 0.75);
  --card-border: rgba(125, 211, 252, 0.3);
  --text-color: #e0f2fe;
  --text-secondary: #93c5fd;
}

[data-theme="rosegold"] {
  --primary-color: #f4a8a0;
  --primary-hover: #e38c84;
  --secondary-color: #ffd7d0;
  --background-color: #1a1313;
  --card-bg: rgba(40, 25, 25, 0.95);
  --card-border: rgba(244, 168, 160, 0.35);
  --text-color: #ffecec;
  --text-secondary: #ffbfb8;
}

[data-theme="mocha"] {
  --primary-color: #b68b6f;
  --primary-hover: #a0745c;
  --secondary-color: #d9b8a3;
  --background-color: #1a120f;
  --card-bg: rgba(40, 30, 25, 0.95);
  --card-border: rgba(182, 139, 111, 0.35);
  --text-color: #f5e9e2;
  --text-secondary: #d2b8a8;
}

[data-theme="pastel"] {
  --primary-color: #a5b4fc;
  --primary-hover: #818cf8;
  --secondary-color: #fecdd3;
  --background-color: #fdf2f8;
  --card-bg: rgba(255, 245, 250, 0.95);
  --card-border: rgba(165, 180, 252, 0.3);
  --text-color: #1e293b;
  --text-secondary: #64748b;
}

[data-theme="galaxy"] {
  --primary-color: #8b5cf6;
  --primary-hover: #4f46e5;
  --secondary-color: #06b6d4;
  --background-color: #0a022e;
  --card-bg: rgba(20, 5, 50, 0.95);
  --card-border: rgba(139, 92, 246, 0.35);
  --text-color: #e0e7ff;
  --text-secondary: #7dd3fc;
}

[data-theme="lava"] {
  --primary-color: #ff4500;
  --primary-hover: #e03e00;
  --secondary-color: #ff7a00;
  --background-color: #0d0705;
  --card-bg: rgba(40, 10, 5, 0.95);
  --card-border: rgba(255, 69, 0, 0.4);
  --text-color: #ffd6c2;
  --text-secondary: #ffb38a;
}

[data-theme="mint"] {
  --primary-color: #5eead4;
  --primary-hover: #2dd4bf;
  --secondary-color: #a7f3d0;
  --background-color: #0f1615;
  --card-bg: rgba(20, 35, 35, 0.95);
  --card-border: rgba(94, 234, 212, 0.3);
  --text-color: #eafffa;
  --text-secondary: #99f6e4;
}

[data-theme="royal"] {
  --primary-color: #7c3aed;
  --primary-hover: #6d28d9;
  --secondary-color: #fbbf24;
  --background-color: #0f0520;
  --card-bg: rgba(30, 15, 60, 0.95);
  --card-border: rgba(124, 58, 237, 0.4);
  --text-color: #ffffff;
  --text-secondary: #c4b5fd;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--background-color);
  color: var(--text-color);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: all 0.3s ease;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, color-mix(in srgb, var(--primary-color) 15%, transparent) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, color-mix(in srgb, var(--secondary-color) 15%, transparent) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, color-mix(in srgb, var(--primary-color) 10%, transparent) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.navbar {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--card-bg) 95%, transparent), color-mix(in srgb, var(--background-color) 95%, transparent));
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 3rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  animation: fadeInDown 0.6s ease;
}

.nav-link {
  padding: 0.75rem 2rem;
  border-radius: 2rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link:hover {
  color: var(--text-color);
  background: color-mix(in srgb, var(--primary-color) 10%, transparent);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-color);
  box-shadow: 0 5px 20px color-mix(in srgb, var(--primary-color) 40%, transparent);
}

.card {
  background: linear-gradient(135deg, var(--card-bg), color-mix(in srgb, var(--background-color) 90%, transparent));
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 1.5rem;
  padding: 2.5rem;
  transition: all 0.4s ease;
  animation: fadeInUp 0.8s ease;
  animation-fill-mode: both;
}

.card:hover {
  transform: translateY(-8px);
  border-color: color-mix(in srgb, var(--primary-color) 50%, transparent);
  box-shadow: 0 30px 70px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.btn {
  padding: 1rem 1.75rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  border-radius: 0.75rem;
  color: var(--text-color);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--primary-color) 30%, transparent);
  letter-spacing: 0.02em;
}

.btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px color-mix(in srgb, var(--primary-color) 50%, transparent);
}

.btn:active:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
}

.input-text, .input-select, .input-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, var(--background-color) 80%, transparent);
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  color: var(--text-color);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
}

.input-text:focus, .input-select:focus, .input-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: color-mix(in srgb, var(--background-color) 90%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.input-text::placeholder {
  color: color-mix(in srgb, var(--text-secondary) 60%, transparent);
}

.input-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.input-select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238b5cf6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

.input-textarea {
  font-family: 'Courier New', monospace;
  resize: vertical;
  min-height: 120px;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -30px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.notification {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
}

.notification.show {
  display: flex;
}

.notification.success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #22c55e;
}

.notification.error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.notification.info {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 15%, transparent), color-mix(in srgb, var(--primary-color) 5%, transparent));
  border: 1px solid color-mix(in srgb, var(--primary-color) 40%, transparent);
  color: var(--primary-color);
}

.loading {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 3px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tab-button {
  padding: 1rem 1.5rem;
  border: none;
  background: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
}

.tab-button.active {
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .navbar {
    top: 1rem;
    padding: 0.375rem;
  }

  .nav-link {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  .card {
    padding: 1.75rem;
  }
}