/*
 * Style sheet for the full Hiven Server site with account system.
 *
 * The design uses a dark, modern palette with blue accents matching
 * the provided logo. It includes styling for the public site, the
 * login and registration forms, and the user dashboard.
 */

/* Color palette variables */
:root {
  /*
   * Colour palette inspired by the Hiven Server logo
   * The primary and secondary colours pick up the vivid blues from
   * the logo gradient, while the accent colour matches the lighter
   * turquoise. Background shades are slightly darker to provide
   * contrast and depth. Adjust these values to fine‑tune the brand
   * identity across the entire site.
   */
  --primary-color: #2bc0e4;     /* Bright brand blue */
  --secondary-color: #0083b0;   /* Darker complementary blue */
  --accent-color: #86e3f0;      /* Light turquoise accent */
  --bg-color: #0a192f;          /* Deep navy background */
  --panel-color: #132a52;       /* Slightly lighter panels */
  --text-color: #ffffff;        /* Base text colour */
  --muted-color: #9fb3c8;       /* Secondary text colour */
  --border-color: rgba(255, 255, 255, 0.1); /* Subtle borders */
  --transition-speed: 0.3s;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}

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

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Top bar */
.top-bar {
  background-color: var(--panel-color);
  font-size: 0.85rem;
  color: var(--muted-color);
  border-bottom: 1px solid var(--border-color);
}

.top-bar .container {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  padding: 0.4rem 0;
}

.top-bar i {
  margin-right: 0.3rem;
  color: var(--primary-color);
}

/* Header and navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(15, 25, 46, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-color);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}

.logo img {
  height: 50px;
  width: auto;
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 1.4rem;
}

.nav a {
  color: var(--muted-color);
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
  transition: color var(--transition-speed);
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-speed);
}

.nav a:hover,
.nav a:focus {
  color: #fff;
}

.nav a:hover::after,
.nav a:focus::after {
  width: 100%;
}

/* Hero section */
.hero {
  height: 80vh;
  background-image: url('images/hero.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 25, 46, 0.7);
}

.hero .hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}

.hero h1 {
  font-size: 2.7rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  color: var(--muted-color);
}

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #fff;
  padding: 0.75rem 1.6rem;
  border-radius: 4px;
  font-weight: 600;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Disabled buttons */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Google social login button */
.btn-google {
  background: #db4437;
  color: #fff;
  border: none;
}
.btn-google:hover {
  background: #c33727;
}

/* Section base styling */
section {
  padding: 4rem 0;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  transform: translateY(40px);
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

section h2 {
  text-align: center;
  font-size: 2.1rem;
  margin-bottom: 2rem;
  font-weight: 600;
}

/* Offers (Pricing) section */
.offers {
  background-color: var(--panel-color);
}

.offer-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.offer-card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.offer-card.highlight {
  border-color: var(--primary-color);
  box-shadow: 0 0 25px rgba(62, 170, 247, 0.4);
}

.offer-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.offer-card .price {
  font-size: 2rem;
  font-weight: 700;
  margin: 1rem 0;
}

.offer-card .price span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted-color);
}

.offer-card ul {
  list-style: none;
  margin-bottom: 1.5rem;
  color: var(--muted-color);
}

.offer-card li {
  margin: 0.4rem 0;
}

.offer-card .btn {
  display: block;
  margin: 0 auto;
  width: fit-content;
}

.offer-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

/* Games list section */
.games {
  background-color: var(--bg-color);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  justify-items: center;
}

/* Game cards with image backgrounds */
.game-card {
  position: relative;
  background-color: var(--panel-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  height: 180px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: #fff;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  background-size: cover;
  background-position: center;
}

/* Dark overlay to improve legibility */
.game-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 25, 46, 0.65);
  transition: background var(--transition-speed);
}

.game-card h3 {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  font-weight: 600;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.game-card:hover::after {
  background: rgba(15, 25, 46, 0.5);
}

/* About section */
.about {
  background-color: var(--panel-color);
}

.about p {
  max-width: 850px;
  margin: 0 auto 1.2rem;
  text-align: center;
  color: var(--muted-color);
}

/* Call to action section */
.cta {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  text-align: center;
  padding: 3rem 1rem;
  color: #fff;
}

.cta h2 {
  margin-bottom: 1rem;
  font-size: 2rem;
}

.cta p {
  margin-bottom: 1.5rem;
  color: #e0eafc;
}

/* Footer */
.footer {
  background-color: var(--bg-color);
  border-top: 1px solid var(--border-color);
  padding-top: 3rem;
  color: var(--muted-color);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h3 {
  margin-bottom: 1rem;
  color: #fff;
  font-size: 1.25rem;
}

.footer-col p {
  margin-bottom: 0.8rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul a {
  color: var(--muted-color);
  transition: color var(--transition-speed);
}

.footer-col ul a:hover {
  color: var(--primary-color);
}

.socials a {
  margin-right: 0.8rem;
  font-size: 1.3rem;
  color: var(--primary-color);
  transition: color var(--transition-speed);
}

.socials a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding: 1rem 0;
  font-size: 0.85rem;
}

/* Forms for login/registration */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-image: url('images/hero.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(15, 25, 46, 0.75);
}

.auth-form {
  position: relative;
  z-index: 1;
  background-color: var(--panel-color);
  padding: 2.5rem 2rem;
  border-radius: 8px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.auth-form h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.auth-form .form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.auth-form label {
  margin-bottom: 0.3rem;
  color: var(--muted-color);
  font-size: 0.95rem;
}

.auth-form input {
  padding: 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 1rem;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(62, 170, 247, 0.4);
}

.auth-form .btn {
  width: 100%;
  text-align: center;
  margin-top: 1rem;
}

.auth-form .alt-link {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted-color);
}

/* Dashboard page */
.dashboard-header {
  background-color: var(--panel-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.dashboard-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.dashboard-nav a {
  color: var(--muted-color);
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
  transition: color var(--transition-speed);
}

.dashboard-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-speed);
}

.dashboard-nav a:hover,
.dashboard-nav a:focus {
  color: #fff;
}

.dashboard-nav a:hover::after,
.dashboard-nav a:focus::after {
  width: 100%;
}

.dashboard-main {
  padding: 3rem 0;
}

.dashboard-main h2 {
  margin-bottom: 1.5rem;
  font-size: 1.9rem;
  text-align: center;
}

.server-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.server-table thead {
  background-color: var(--panel-color);
}

.server-table th,
.server-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  color: var(--muted-color);
  font-size: 0.95rem;
}

.server-table th {
  font-weight: 600;
  color: #fff;
}

.server-table tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.status-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  display: inline-block;
}

.status-online {
  background-color: #29b97c;
}

.status-offline {
  background-color: #c0392b;
}

.action-btn {
  margin-right: 0.4rem;
  padding: 0.35rem 0.6rem;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #fff;
  cursor: pointer;
  transition: opacity var(--transition-speed);
}

.action-start {
  background-color: #29b97c;
}

.action-stop {
  background-color: #c0392b;
}

.action-delete {
  background-color: #f1c40f;
  color: #0f192e;
}

.action-btn:hover {
  opacity: 0.8;
}

/* Add server form */
.add-server-form {
  background-color: var(--panel-color);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.add-server-form h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.add-server-form .form-row {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.add-server-form label {
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  color: var(--muted-color);
}

.add-server-form input,
.add-server-form select {
  padding: 0.7rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 1rem;
}

.add-server-form button {
  margin-top: 0.5rem;
  width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .offer-card .price {
    font-size: 1.6rem;
  }
  .dashboard-nav ul {
    gap: 0.6rem;
  }
}

/* Spin wheel animation */
@keyframes spinWheel {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(1440deg);
  }
}

.spin-animation {
  animation: spinWheel 3s cubic-bezier(0.33, 1, 0.68, 1);
}