:root {
  --bg-dark: #070d14;
  --bg-card: rgba(16, 26, 40, 0.65);
  --bg-card-hover: rgba(24, 38, 58, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(56, 189, 248, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-cyan: #38bdf8;
  --accent-purple: #a855f7;
  --accent-teal: #14b8a6;
  --accent-green: #22c55e;
  --accent-telegram: #229ed9;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Cairo', 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  padding: 30px 20px;
  position: relative;
}

/* Ambient Background Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #38bdf8, transparent);
  top: -150px;
  right: -150px;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #a855f7, transparent);
  bottom: -200px;
  left: -200px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Top Nav */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  padding: 16px 28px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.brand-info h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #ffffff, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub-title {
  font-size: 13px;
  color: var(--text-muted);
}

.system-stats-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 8px 18px;
  border-radius: 30px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.status-text {
  font-size: 13px;
  font-weight: 700;
  color: #4ade80;
  letter-spacing: 0.5px;
}

/* Banner Card */
.banner-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(24, 40, 65, 0.7), rgba(16, 26, 40, 0.7));
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  margin-bottom: 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.greeting-box h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.banner-desc {
  color: var(--text-muted);
  font-size: 15px;
}

.clock-box {
  text-align: left;
  background: rgba(0, 0, 0, 0.25);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.time-display {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 1px;
}

.date-display {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Search Bar */
.search-bar-wrap {
  margin-bottom: 35px;
}

.search-bar-wrap input {
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  padding: 18px 26px;
  border-radius: var(--radius-lg);
  color: #fff;
  font-size: 16px;
  font-family: 'Cairo', sans-serif;
  transition: all 0.3s ease;
  outline: none;
}

.search-bar-wrap input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.25);
}

/* Main Grid */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.service-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(56, 189, 248, 0.15);
}

.card-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.status-online {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-telegram {
  background: rgba(34, 158, 217, 0.15);
  color: var(--accent-telegram);
  border: 1px solid rgba(34, 158, 217, 0.3);
}

.card-icon {
  font-size: 40px;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 24px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
}

.card-link-label {
  font-weight: 700;
  color: var(--accent-cyan);
  transition: transform 0.2s ease;
}

.service-card:hover .card-link-label {
  transform: translateX(-4px);
}

.card-port {
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 14px;
  border-top: 1px solid var(--border-color);
}

.footer-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.footer-dots span {
  width: 6px;
  height: 6px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  opacity: 0.4;
}

/* Responsive */
@media (max-width: 768px) {
  .top-nav, .banner-card {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .clock-box {
    text-align: center;
    width: 100%;
  }
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}
