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

:root {
  /* Premium Dark Theme Palette */
  --bg-primary: #09090b;
  --bg-secondary: #121214;
  --bg-glass: rgba(18, 18, 20, 0.7);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-focus: rgba(124, 58, 237, 0.4);

  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  /* Vibrant Accents */
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.35);
  --accent-gold: #fbbf24;
  --accent-gold-glow: rgba(251, 191, 36, 0.3);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.3);
  --accent-rose: #f43f5e;

  /* Fonts & Shadows */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.15);

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 12px;
}

.light-theme {
  /* Premium Light Theme Palette */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.7);
  --border-glass: rgba(15, 23, 42, 0.08);
  --border-glass-focus: rgba(124, 58, 237, 0.5);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent-purple: #7c3aed;
  --accent-purple-glow: rgba(124, 58, 237, 0.15);
  --accent-gold: #d97706;
  --accent-gold-glow: rgba(217, 119, 6, 0.1);
  --accent-emerald: #059669;
  --accent-emerald-glow: rgba(5, 150, 105, 0.1);
  --accent-rose: #e11d48;

  --shadow-premium: 0 8px 32px 0 rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.08);
}

.light-theme::before,
.light-theme::after {
  opacity: 0.06;
}

/* CSS Reset & Base styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Subtle background glowing spots for rich aesthetics */
body::before,
body::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  z-index: -1;
  filter: blur(150px);
  pointer-events: none;
  opacity: 0.15;
}

body::before {
  top: 10%;
  left: -100px;
  background: var(--accent-purple);
}

body::after {
  bottom: 20%;
  right: -100px;
  background: var(--accent-gold);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Main Layout Wrapper */
#app-router-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem 1.5rem;
}

/* Typography elements */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Button & Form UI system */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: var(--border-radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), #6366f1);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
  background: linear-gradient(135deg, #9b6bf7, #7478f2);
}

.btn-secondary {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--accent-purple);
  background: rgba(255, 255, 255, 0.05);
}

.btn-disabled {
  background: var(--bg-secondary) !important;
  color: var(--text-muted) !important;
  border-color: var(--border-glass) !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

/* Glassmorphism container classes */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: var(--shadow-premium), 0 0 30px rgba(139, 92, 246, 0.05);
}

/* Shimmer animations */
@keyframes pulse-glow {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}

.glow-text {
  text-shadow: 0 0 15px var(--accent-purple-glow);
}

.gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Premium Form UI Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.form-input {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border-radius: var(--border-radius);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 12px var(--accent-purple-glow);
  background-color: rgba(255, 255, 255, 0.06);
}

.select-input {
  cursor: pointer;
  appearance: none;
  background-repeat: no-repeat;
  background-position: right 1.2rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
  /* Default dark theme arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a1a1aa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}

/* Light theme arrow override */
.light-theme .select-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}

.text-area-main {
  min-height: 250px;
  resize: vertical;
  line-height: 1.6;
}

/* Global select option colors */
.select-input option {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

/* Global back navigation styles */
.back-nav {
  margin-bottom: 2.5rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Ensure grid items and custom components are block-level */
uov-card-riset {
  display: block;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  row-gap: 2.5rem;
  /* Explicitly enforce row gap */
}

uov-card-riset {
  margin-bottom: 45px;
}