@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
  --primary: #1e3a8a;
  /* deep blue */
  --primary-light: #3b82f6;
  /* bright blue */
  --accent: #22c55e;
  /* green success */
  --bg-color: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  background-image:
    radial-gradient(at 0% 0%, hsla(217, 100%, 76%, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, hsla(253, 100%, 76%, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, hsla(217, 100%, 76%, 0.15) 0px, transparent 50%),
    radial-gradient(at 0% 100%, hsla(253, 100%, 76%, 0.15) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Header */
.top-header {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.brand-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo span {
  color: var(--primary-light);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Grid layout for promotions */
.promotions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 4rem auto;
  padding: 0 1.5rem;
}

.promo-card {
  background: var(--surface);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}

.promo-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.promo-img-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.promo-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.promo-card:hover .promo-img-wrapper img {
  transform: scale(1.05);
}

.badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow-sm);
}

.promo-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.promo-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.promo-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.promo-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
  flex-grow: 1;
}

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 0.3rem;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  width: 100%;
}

.btn-primary:hover {
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

/* Admin/Form specific styles */
.admin-container {
  max-width: 600px;
  margin: 3rem auto;
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.3rem;
  font-size: 1rem;
  transition: var(--transition);
  background: #ffffff;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.admin-list {
  margin-top: 3rem;
}

.admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-color);
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #e2e8f0;
}

.btn-danger {
  background: #ef4444;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.btn-danger:hover {
  background: #dc2626;
}

/* Loader */
.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem;
  font-style: italic;
}