:root {
  --font-sans: "Inter", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  
  /* Color Palette - Light/Modern/AI */
  --bg-body: #ffffff;
  --bg-surface: #f8fafc; /* Very light slate */
  --bg-card: #ffffff;
  
  --bg-gradient-mesh: radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
                      radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
                      radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
  --bg-dynamic: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);

  --text-primary: #0f172a; /* Slate 900 */
  --text-secondary: #475569; /* Slate 600 */
  --text-tertiary: #94a3b8; /* Slate 400 */
  
  --primary-color: #6366f1; /* Indigo */
  --primary-hover: #4f46e5;
  --primary-light: #eef2ff;
  
  --accent-color: #8b5cf6; /* Violet */
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  
  --border-color: #e2e8f0; /* Slate 200 */
  --border-focus: #6366f1;
  
  --success-bg: #d1fae5;
  --success-text: #065f46;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Colorful Accents */
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-orange: #f97316;
  --accent-teal: #14b8a6;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Ad Slot Fixes */
.ad-slot {
  position: relative;
  overflow: hidden; /* Prevent expansion */
  max-width: 100%;
}
.ad-slot ins.adsbygoogle {
  display: block !important;
  width: 100% !important;
  height: 100% !important; /* Force fit if parent has height */
}

/* Colorful buttons */
.button.secondary:nth-child(1):hover { background: #eff6ff; color: var(--accent-blue); border-color: var(--accent-blue); }
.button.secondary:nth-child(2):hover { background: #f5f3ff; color: var(--accent-purple); border-color: var(--accent-purple); }
.button.secondary:nth-child(3):hover { background: #fdf2f8; color: var(--accent-pink); border-color: var(--accent-pink); }
.button.secondary:nth-child(4):hover { background: #fff7ed; color: var(--accent-orange); border-color: var(--accent-orange); }
.button.secondary:nth-child(5):hover { background: #f0fdfa; color: var(--accent-teal); border-color: var(--accent-teal); }

/* Dashboard Headers with Gradient */
h1 {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Status Badges */
.badge.status-completed, .badge.status-active, .badge.status-paid { background: #dcfce7; color: #166534; }
.badge.status-pending, .badge.status-deploying { background: #fef9c3; color: #854d0e; }
.badge.status-failed, .badge.status-offline, .badge.status-banned { background: #fee2e2; color: #991b1b; }
.badge.status-processing, .badge.status-running { background: #dbeafe; color: #1e40af; }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-surface);
  /* Dynamic Background */
  background: linear-gradient(-45deg, #e2e8f0, #dbeafe, #ccfbf1, #fed7aa);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-color);
}

.container {
  max-width: 1600px;
  width: 95%;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

h1 { font-size: 36px; margin-bottom: 24px; }
h2 { font-size: 24px; margin-bottom: 16px; }
h3 { font-size: 18px; margin-bottom: 12px; }

p {
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}

/* Header & Nav */
.topbar {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  font-size: 20px;
  font-weight: 800;
  background: var(--accent-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-link:hover {
  color: var(--text-primary);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.button:hover {
  background: var(--primary-hover);
  color: white;
  transform: translateY(-1px);
}

.button.secondary {
  background: white;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.button.secondary:hover {
  background: var(--bg-surface);
  border-color: var(--text-tertiary);
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  background: var(--accent-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
}

.hero p {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero .actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.2s;
}

.card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

/* Forms */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: white;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 32px;
  min-height: calc(100vh - 72px - 60px);
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
}

.sidebar-link:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: var(--primary-light);
  color: var(--primary-color);
}

.dashboard-content {
  flex: 1;
  min-width: 0;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.badge.status-completed, .badge.status-active, .badge.status-paid { background: #dcfce7; color: #166534; }
.badge.status-pending, .badge.status-deploying { background: #fef9c3; color: #854d0e; }
.badge.status-failed, .badge.status-offline, .badge.status-banned { background: #fee2e2; color: #991b1b; }
.badge.status-processing, .badge.status-running { background: #dbeafe; color: #1e40af; }

/* Table */
.table-container {
  overflow-x: auto;
}

/* Footer */
footer {
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  background: white;
  font-size: 12px;
}

footer p {
  margin: 0;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 14px;
}
