:root {
  --brand-gradient: linear-gradient(135deg,#2563eb,#10b981);
  --brand-primary: #2563eb;
  --brand-accent: #10b981;
  --brand-danger: #dc3545;
  --brand-bg: #f2f4f8;
  --brand-text: #1f2937;
  --brand-muted: #6b7280;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-glass: rgba(255,255,255,0.75);
  --border-color: rgba(0,0,0,0.08);
  --shadow-sm: 0 2px 4px -2px rgba(0,0,0,0.08), 0 4px 12px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 30px -8px rgba(0,0,0,0.25);
  --transition-fast: .25s ease;
  --radius: 14px;
  --radius-sm: 8px;
  --focus-ring: 0 0 0 3px rgba(37,99,235,0.35);
  --gradient-primary: linear-gradient(90deg,#2563eb,#4f46e5);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

[data-theme="dark"] {
  --brand-bg: #111827;
  --brand-text: #f1f5f9;
  --brand-muted: #94a3b8;
  --surface: #1e293b;
  --surface-alt: #24324a;
  --surface-glass: rgba(30,41,59,0.82);
  --border-color: rgba(255,255,255,0.12);
  --gradient-primary: linear-gradient(90deg,#4f46e5,#2563eb);
  --shadow-sm: 0 2px 4px -2px rgba(0,0,0,0.7), 0 4px 12px -2px rgba(0,0,0,0.45);
  --shadow-lg: 0 10px 30px -8px rgba(0,0,0,0.6);
}

body.app-body {
  background: var(--brand-bg);
  color: var(--brand-text);
  transition: background .6s ease, color .6s ease;
}

/* Typography */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  color: transparent;
}

/* Navbar */
.navbar-glass {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
  position: sticky; /* or fixed if you prefer */
  top: 0;
  z-index: 1030; /* keep above content */
}
.brand-logo { height:60px; transition: transform .3s; }
.brand-logo:hover { transform: scale(1.05); }
.brand-text { letter-spacing:.5px; }

.theme-toggle {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 1.1rem;
  transition: transform .25s;
}
.theme-toggle:hover { transform: scale(1.15); }

.user-pill { transition: background .25s; border-radius: var(--radius-sm); }
.user-pill:hover { background: rgba(0,0,0,0.04); }
[data-theme="dark"] .user-pill:hover { background: rgba(255,255,255,0.08); }

.avatar-tile {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 600;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: var(--shadow-sm);
}
.hero-logo {
  width: 180px;     /* adjust this as you like */
  height: auto;
  max-width: 100%;
    margin-left: auto;
  margin-right: auto;

}
/* Hero */
.hero-section {
  background: linear-gradient(135deg,#0f2027,#203a43,#2c5364);
  border-radius: var(--radius);
  padding: 70px 30px;
  position: relative;
  color: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-title { letter-spacing: .5px; }
.hero-description, .hero-lead { max-width: 820px; margin: 0 auto; }
.hero-blur {
  position:absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: .35;
  pointer-events:none;
}
.hero-blur-1 {
  top: -120px;
  left: -120px;
  background: radial-gradient(circle at center,#2563eb,#2563eb 40%,transparent 70%);
}
.hero-blur-2 {
  bottom: -120px;
  right: -120px;
  background: radial-gradient(circle at center,#10b981,#10b981 40%,transparent 70%);
}
.hero-action { transition: transform .3s, box-shadow .3s; }
.hero-action:hover { transform: translateY(-4px); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.45); }

/* Cards & Layout */
.app-card { background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius); }
.hover-raise { transition: transform .4s var(--transition-fast), box-shadow .4s var(--transition-fast); }
.hover-raise:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg) !important; }
.feature-card { background: var(--surface); border-radius: var(--radius); border:1px solid var(--border-color); transition: box-shadow .3s; }
.feature-card:hover { box-shadow: var(--shadow-lg); }

.profile-card { background: var(--surface); border:1px solid var(--border-color); border-radius: var(--radius); }
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100%;
}
.profile-card-big{
background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100%;
  padding: 2.5rem 2rem;      /* was smaller – adds more breathing room */
  font-size: 1rem;
}
@media (max-width: 768px) {
    .profile-photo {
        width: 120px;
        height: 120px;
    }
    .hero-logo {
    width: 90px;
  }
}

.mini-logo { height:25px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.12)); }

.player-surface {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 8px;
}

.credit-panel { background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius); }

.demo-card { background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius); }
.demo-frame { border:0; }

/* Range styling */
.summarize-range { cursor: pointer; }
.summarize-range::-webkit-slider-thumb {
  background: var(--gradient-primary);
  border: 2px solid #fff;
}
.summarize-range::-moz-range-thumb {
  background: var(--gradient-primary);
  border: 2px solid #fff;
}

/* Alerts & spinners */
.spinner-sm { width: 1.75rem; height: 1.75rem; }

/* Links */
.hover-link { position:relative; text-decoration:none; }
.hover-link:hover { color: var(--brand-primary) !important; }
.hover-link:after {
  content:"";
  position:absolute;
  left:0;
  bottom:-2px;
  height:2px;
  background: var(--gradient-primary);
  width:0;
  transition: width .35s;
}
.hover-link:hover:after { width:100%; }

/* Buttons */
.btn-primary, .btn-success, .btn-outline-primary {
  font-weight: 600 !important;
  letter-spacing: .4px;
}
.btn-primary { background: var(--gradient-primary); border: none; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline-primary:hover { background: var(--gradient-primary); color: #fff !important; }

.badge.bg-gradient-primary { background: var(--gradient-primary); }

.profile-icon { object-fit: cover; }

/* Footer */
footer { font-size: .85rem; }

/* Transitions */
a, button, input, textarea { transition: all .35s; }

/* Accessibility focus */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
  outline: none !important;
  box-shadow: var(--focus-ring);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero-section { padding: 55px 25px; }
  .hero-title { font-size: 2.2rem; }
  .hero-description { font-size: 1rem; }
  .mini-logo { height: 30px; !important}
}

/* Utility classes */
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.text-muted { color: var(--brand-muted) !important; }
.small { font-size: .85rem !important; }

/* Fade animation for dropdown */
.dropdown-menu { animation: fadeIn .3s ease-in-out; }
@keyframes fadeIn {
  from { opacity:0; transform: translateY(5px); }
  to { opacity:1; transform: translateY(0); }
}

/* Ensure background readability in dark mode */
[data-theme="dark"] .hero-section { background: linear-gradient(145deg,#1e293b,#243b53,#1e293b); }
[data-theme="dark"] .hover-link:hover { color: #10b981 !important; }

/* Message emphasis */
.alert { font-weight: 500; }

/* === Mobile enhancements (appended) === */

/* Mobile responsiveness fixes and refinements */
.brand-logo{ max-height:40px; width:auto; }
.brand-text{ font-size:1rem; }
.navbar-glass {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
  position: sticky; /* or fixed if you prefer */
  top: 0;
  z-index: 1030; /* keep above content */
}
@media (max-width: 768px){
  .container{ padding-left:12px; padding-right:12px; }
  .hero .display-5{ font-size:1.6rem; }
  .lead{ font-size:0.95rem; }
  .card{ padding:12px; border-radius:12px; }
  .profile-card img, .avatar{ width:56px; height:56px; }
  .profile-card-big img, .avatar{ width:86px; height:86px; }
  .demo-frame{ min-height:180px; }
  .navbar .dropdown-menu{ max-width:90vw; }
  .navbar .nav-link{ padding-left:8px; padding-right:8px; }
}
/* Ensure media scales inside cards */
.card img, .card video, .card iframe{ max-width:100%; height:auto; display:block; }
/* Prevent accidental horizontal overflow */
html, body { overflow-x: hidden; }
/* Small tweak for forms */
input.input, textarea.input, select.form-control{ width:100%; box-shadow:none; }
/* Table responsiveness */
.table-responsive{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
/* Improve clickable areas */
.btn{ min-height:44px; padding-top:8px; padding-bottom:8px; }
/* Utility for increased spacing on mobile */
@media (max-width:480px){
  .hero{ padding-top:40px; padding-bottom:30px; }
  .brand-logo{ max-height:36px; }
  .site-footer p, .site-footer small{ font-size:13px; }
}
