﻿:root {
  --blue: #0d47a1;
  --light-blue: #42a5f5;
  --red: #c62828;
  --white: #ffffff;
  --paper: #f7f9fc;
  --text: #10243d;
  --shadow: 0 14px 35px rgba(13, 71, 161, 0.22);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(198, 40, 40, 0.25), transparent 35%),
    radial-gradient(circle at 85% 18%, rgba(66, 165, 245, 0.35), transparent 30%),
    linear-gradient(145deg, #e7f1ff 0%, #fff8f8 48%, #eff5ff 100%);
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 520px;
  padding: 28px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.88));
  border: 3px solid rgba(13, 71, 161, 0.18);
  box-shadow: var(--shadow);
}

h1 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 1.8rem;
}

.lead {
  margin-top: 0;
  margin-bottom: 20px;
  color: #244a73;
  line-height: 1.5;
}

.login-form,
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  font-weight: 700;
  color: #16365a;
}

input {
  border: 2px solid rgba(13, 71, 161, 0.25);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
  transition: 0.2s ease;
}

input:focus {
  border-color: var(--light-blue);
  box-shadow: 0 0 0 4px rgba(66, 165, 245, 0.2);
}

button,
.button {
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(110deg, var(--blue), var(--red));
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px rgba(198, 40, 40, 0.25);
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(13, 71, 161, 0.24);
}

.error,
.success {
  margin: 0 0 14px;
  border: 2px solid rgba(198, 40, 40, 0.3);
  border-radius: var(--radius);
  background: #fff1f1;
  color: #8d1a1a;
  padding: 10px 12px;
}

.success {
  border-color: rgba(13, 71, 161, 0.25);
  background: #eef6ff;
  color: #0d3d81;
}

.info {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
}

.dashboard-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 16px;
}

.dashboard-header {
  height: 10vh;
  min-height: 78px;
  background: linear-gradient(120deg, rgba(13, 71, 161, 0.92), rgba(198, 40, 40, 0.9));
  border-radius: 22px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.dashboard-title {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-chip {
  margin: 0;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #ffffff, #e8f2ff);
  color: #133a64;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.avatar-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(13, 71, 161, 0.4);
  background: #fff;
}

.logout-button {
  margin: 0;
  padding: 10px 16px;
}

.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.game-tile {
  margin: 0;
  min-height: 136px;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background-size: cover;
  background-position: center;
  box-shadow: 0 12px 24px rgba(9, 29, 62, 0.28);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 14px;
  text-align: left;
  text-decoration: none;
  color: #fff;
}

.game-tile span {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

@media (max-width: 980px) {
  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .card {
    padding: 22px 18px;
  }

  .dashboard-page {
    padding: 12px;
  }

  .dashboard-header {
    height: auto;
    min-height: 84px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }
}