/* =========================================================
   Global SaaS Theme — Blue→Cyan Gradient Edition
   Author: Code GPT | Built for Shortly.io
   ========================================================= */

/* ---------- Root Variables ---------- */
:root {
  --primary-color: #2563eb; /* Blue */
  --secondary-color: #06b6d4; /* Cyan */
  --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --text-dark: #1e293b;
  --text-light: #f8fafc;
  --text-muted: #64748b;
  --bg-light: #f9fafb;
  --bg-dark: #0f172a;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --transition: all 0.25s ease;
}

/* Dark mode overrides */
body.dark {
  --bg-light: var(--bg-dark);
  --text-dark: #f1f5f9;
  --text-light: #e2e8f0;
  --text-muted: #94a3b8;
  --card-bg: #1e293b;
  --border-color: #334155;
}

/* ---------- Base Layout ---------- */
body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-light);
  color: var(--text-dark);
  transition: var(--transition);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* Smooth fade-in animations */
.fade-in {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Header ---------- */
header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 999;
  transition: var(--transition);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-dark);
  text-decoration: none;
}

nav a {
  margin-left: 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
nav a:hover {
  color: var(--primary-color);
}

/* Dark/Light Toggle */
.theme-toggle {
  background: var(--gradient);
  border: none;
  color: white;
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  transition: var(--transition);
}
.theme-toggle:hover {
  opacity: 0.9;
}

/* ---------- Hero Section ---------- */
.hero {
  text-align: center;
  padding: 100px 20px;
  background: var(--bg-light);
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  font-size: 3rem;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* ---------- Shortener Form ---------- */
.shorten-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.shorten-form input {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 1rem;
  flex: 1;
  min-width: 220px;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: var(--transition);
}
.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* Result messages */
#result {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  font-weight: 500;
}
#result.success {
  background: rgba(34,197,94,0.15);
  color: #16a34a;
}
#result.error {
  background: rgba(239,68,68,0.15);
  color: #dc2626;
}

/* ---------- Cards Section ---------- */
.features .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
  transition: var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}
.card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.card p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ---------- Teaser Section ---------- */
.teaser {
  text-align: center;
  padding: 80px 20px;
  background: var(--gradient);
  color: white;
  border-radius: 20px;
  margin: 60px auto;
}
.teaser h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}
.teaser p {
  opacity: 0.9;
}

/* ---------- Dashboard Analytics ---------- */
.dashboard {
  padding: 60px 20px;
}
.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.filter-select {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-dark);
}
.chart-container {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
  margin-top: 30px;
}
.chart-container canvas {
  width: 100% !important;
  height: 350px !important;
}

/* ---------- Forms (Login / Register) ---------- */
.form-container {
  max-width: 400px;
  margin: 60px auto;
  background: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
.form-container h1 {
  text-align: center;
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-dark);
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 30px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background: var(--card-bg);
  margin-top: 60px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .navbar nav { display: none; }
  .hero h1 { font-size: 2.2rem; }
  .shorten-form { flex-direction: column; }
  .features .cards { grid-template-columns: 1fr; }
}
/* =========================================================
   Header / Navbar Responsive Enhancements
   ========================================================= */
.main-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  text-decoration: none;
}
.logo span {
  color: var(--secondary-color);
}

/* Desktop Nav */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.desktop-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.desktop-nav a:hover {
  color: var(--primary-color);
}

/* Hamburger (hidden on desktop) */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 24px;
  height: 20px;
  justify-content: space-between;
}
.hamburger span {
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--card-bg);
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}
.mobile-nav a {
  padding: 10px 0;
  text-decoration: none;
  color: var(--text-dark);
}
.mobile-nav a.btn-primary {
  display: block;
  text-align: center;
  margin-top: 10px;
}
.mobile-nav.active {
  display: flex;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Rules */
@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .hamburger { display: flex; }
}
/* ===============================
   404 Page (Modern SaaS Style)
================================*/
.error-page {
  padding: 120px 20px;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  text-align: center;
}

.error-illustration {
  margin-bottom: 30px;
  opacity: 0.85;
}

.gradient-text {
  background: linear-gradient(90deg, #00B4DB, #0083B0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.error-page h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.error-page .subtitle {
  font-size: 1.2rem;
  opacity: 0.8;
  margin-bottom: 35px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn-primary.glow {
  box-shadow: 0 0 15px rgba(0, 180, 219, 0.4);
  transition: all 0.3s ease;
}

.btn-primary.glow:hover {
  box-shadow: 0 0 25px rgba(0, 180, 219, 0.7);
  transform: translateY(-2px);
}

.floating {
  animation: float 4s ease-in-out infinite;
}

.fade-in {
  animation: fadeIn 0.8s ease-in-out both;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .error-page h1 {
    font-size: 2.2rem;
  }
  .error-page .subtitle {
    font-size: 1rem;
  }
}
