@font-face {
  font-family: "PlayFreeGames";
  src: url("hmg/assets/play-free-games-free-font.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color Palette - Vibrant Kid-Friendly Premium */
  --primary-blue: #00bfff; /* Deep Sky Blue */
  --primary-purple: #9d50bb;
  --primary-pink: #ff69b4; /* Hot Pink */
  --primary-yellow: #ffd700; /* Gold */
  --accent-green: #32cd32;

  --bg-gradient-start: #e0f7fa;
  --bg-gradient-end: #87ceeb;

  --text-main: #2c3e50;
  --text-light: #ffffff;

  --card-bg: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: 4px solid #ffffff;

  --shadow-pop: 0 8px 0 rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 15px 25px rgba(0, 0, 0, 0.1);

  --header-height: 90px;
  --container-width: 1200px;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "PlayFreeGames", "Comic Sans MS", sans-serif;
  background: linear-gradient(
    180deg,
    var(--bg-gradient-start) 0%,
    var(--bg-gradient-end) 100%
  );
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  background-attachment: fixed;
}

a {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
a:hover {
  transform: scale(1.05);
}
ul {
  list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
  text-transform: uppercase;
  text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
  letter-spacing: 1px;
}

/* Header */
header {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 5px solid var(--primary-blue);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  width: 100%;
  max-width: var(--container-width);
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.secondary-logo {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.1));
  animation: bounce 2s infinite;
}

.main-logo {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.1));
}

@media (max-width: 600px) {
  .main-logo {
    display: none;
  }
}

/* More Games Button */
.more-games-btn {
  background: linear-gradient(to bottom, #ffd700, #ffa500);
  color: #4a3b00;
  padding: 12px 25px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: bold;
  border: 3px solid #fff;
  box-shadow:
    0 6px 0 #cc8400,
    0 10px 10px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.more-games-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 10px 0 #cc8400,
    0 15px 20px rgba(0, 0, 0, 0.2);
  filter: brightness(1.1);
}

.more-games-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #cc8400,
    0 4px 4px rgba(0, 0, 0, 0.2);
}

/* Discord Button */
.discord-btn {
  background: linear-gradient(to bottom, #5865F2, #4752C4);
  color: white;
  padding: 12px 25px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: bold;
  border: 3px solid #fff;
  box-shadow:
    0 6px 0 #3c45a5,
    0 10px 10px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  margin-left: 10px;
}

.discord-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 10px 0 #3c45a5,
    0 15px 20px rgba(0, 0, 0, 0.2);
  filter: brightness(1.1);
}

.discord-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #3c45a5,
    0 4px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .discord-btn {
    font-size: 1rem;
    padding: 10px 20px;
    margin-left: 5px;
  }
  
  .nav-container {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* Main Content */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 40px 20px;
}

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

.hero h1 {
  font-size: 4rem;
  color: white;
  text-shadow:
    4px 4px 0 var(--primary-pink),
    -2px -2px 0 var(--primary-blue),
    0 0 20px rgba(255, 255, 255, 0.5);
  margin-bottom: 10px;
  animation: pulse 3s infinite;
}

.hero p {
  font-size: 1.3rem;
  color: #024;
  font-weight: bold;
  max-width: 700px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.6);
  padding: 10px 20px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
}

/* Ad Container */
.ad-wrapper {
  background: rgba(255, 255, 255, 0.4);
  border: 3px dashed var(--primary-blue);
  border-radius: 20px;
  margin: 30px auto;
  padding: 10px;
  max-width: 900px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Controls (Search & Random) */
.controls-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.search-input {
  padding: 15px 25px;
  font-size: 1.2rem;
  border-radius: 50px;
  border: 3px solid var(--primary-purple);
  width: 100%;
  max-width: 400px;
  font-family: "PlayFreeGames", sans-serif;
  outline: none;
  box-shadow: 0 5px 0 rgba(157, 80, 187, 0.3);
  transition: all 0.2s;
}

.search-input:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 rgba(157, 80, 187, 0.3);
  border-color: var(--primary-pink);
}

.random-btn {
  background: var(--accent-green);
  color: white;
  border: 3px solid white;
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 5px 0 #228b22;
  transition: all 0.1s;
  font-family: "PlayFreeGames", sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
}

.random-btn:hover {
  transform: scale(1.05);
  background: #40e040;
}

.random-btn:active {
  transform: translateY(4px);
  box-shadow: none;
}

/* Games Grid */
.section-title {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: var(--primary-purple);
  text-align: center;
  background: white;
  display: inline-block;
  padding: 10px 40px;
  border-radius: 50px;
  box-shadow: var(--shadow-pop);
  transform: rotate(-2deg);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 35px;
  margin-bottom: 60px;
}

.game-card {
  background: var(--card-bg);
  border-radius: 25px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 5px solid white;
  box-shadow:
    0 10px 0 #ddd,
    0 15px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow:
    0 20px 0 #ccc,
    0 25px 30px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.card-image-wrapper {
  height: 220px;
  overflow: hidden;
  border-bottom: 5px solid var(--primary-blue);
  background: #eee;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.game-card:hover .card-thumb {
  transform: scale(1.1) rotate(2deg);
}

.card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.card-title {
  font-size: 1.6rem;
  color: var(--primary-blue);
  margin-bottom: 10px;
  line-height: 1.1;
}

.card-desc {
  font-size: 1rem;
  color: #666;
  margin-bottom: 20px;
  flex-grow: 1;
  line-height: 1.4;
}

.play-btn {
  background: linear-gradient(to bottom, #ff69b4, #d1478c);
  color: white;
  border: 3px solid white;
  padding: 12px;
  border-radius: 15px;
  font-size: 1.3rem;
  text-transform: uppercase;
  box-shadow: 0 5px 0 #a0356a;
  transition: all 0.1s;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.game-card:hover .play-btn {
  background: linear-gradient(to bottom, #ff8bc4, #e65c9e);
  box-shadow: 0 7px 0 #a0356a;
  transform: scale(1.05);
}

.play-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #a0356a;
}

/* Locked State */
.game-card.locked {
  filter: grayscale(0.5);
  cursor: default;
}
.game-card.locked:hover {
  transform: none;
  box-shadow:
    0 10px 0 #ddd,
    0 15px 20px rgba(0, 0, 0, 0.1);
}
.game-card.locked .play-btn {
  background: #ccc;
  box-shadow: 0 5px 0 #999;
}

/* SEO Content Area */
.seo-section {
  background: white;
  border-radius: 30px;
  padding: 40px;
  border: 5px solid var(--primary-yellow);
  box-shadow: var(--shadow-hover);
  margin-top: 60px;
  text-align: left;
}

.seo-section h2 {
  color: var(--primary-pink);
  border-bottom: 3px dashed var(--primary-blue);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
  justify-content: center;
}

.tag {
  background: #e0f7fa;
  color: var(--primary-blue);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 2px solid var(--primary-blue);
  font-weight: bold;
}

/* Footer */
footer {
  background: var(--text-main);
  color: white;
  padding: 60px 20px;
  text-align: center;
  margin-top: auto;
  border-top: 10px solid var(--primary-purple);
}

.support-btn {
  display: inline-block;
  background: #ffdd00;
  color: #000;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: bold;
  font-size: 1.1rem;
  margin-top: 20px;
  border: 3px solid #000;
  box-shadow: 5px 5px 0 #000;
  margin-bottom: 20px;
  margin-right: 10px;
}

.support-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 #000;
}

.support-btn:active {
  transform: translate(0, 0);
  box-shadow: 0 0 0 #000;
}

.discord-btn-footer {
  display: inline-block;
  background: linear-gradient(to bottom, #5865F2, #4752C4);
  color: white;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: bold;
  font-size: 1.1rem;
  margin-top: 20px;
  border: 3px solid white;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
  text-decoration: none;
}

.discord-btn-footer:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.3);
  filter: brightness(1.1);
}

.discord-btn-footer:active {
  transform: translate(0, 0);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
}

.footer-logo {
  height: 60px;
  margin-bottom: 20px;
  transition: transform 0.3s;
}

.footer-logo:hover {
  transform: rotate(-5deg) scale(1.1);
}

/* Animations */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Trending Section Styles */
.trending-section {
  animation: fadeIn 0.5s ease;
}

.trending-topics-grid {
  min-height: 100px;
}

.trending-topic-card {
  user-select: none;
}

.trending-topic-card:active {
  transform: scale(0.95) !important;
}

/* Action Buttons for SEO */
.action-btn-seo {
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.action-btn-seo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.action-btn-seo:active {
  transform: translateY(0);
}

/* Form Styles */
.submit-rating-btn:hover,
.submit-contact-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.submit-rating-btn:active,
.submit-contact-btn:active {
  transform: scale(0.98);
}

/* Star Rating */
.star-rating .star {
  transition: all 0.2s ease;
  user-select: none;
}

.star-rating .star:hover {
  transform: scale(1.2);
}

/* Form Input Focus Styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
  transform: scale(1.01);
  transition: all 0.2s ease;
}

/* Success Message Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Fake Chat Widget Styles */
.fake-chat-container {
  width: 100%;
  max-width: 450px;
  margin: 40px auto;
  background: var(--card-bg);
  border-radius: 25px;
  border: 5px solid white;
  box-shadow: 0 10px 0 #ddd, 0 15px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  font-family: "PlayFreeGames", "Comic Sans MS", sans-serif;
}

.fake-chat-header {
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

.fake-chat-messages {
  height: 400px;
  padding: 15px;
  overflow-y: auto;
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
  scrollbar-width: thin;
  scrollbar-color: var(--primary-blue) #e0e0e0;
}

.fake-chat-messages::-webkit-scrollbar {
  width: 8px;
}

.fake-chat-messages::-webkit-scrollbar-track {
  background: #e0e0e0;
  border-radius: 10px;
}

.fake-chat-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--primary-blue), var(--primary-purple));
  border-radius: 10px;
}

.fake-chat-message {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
  animation: fadeInMessage 0.4s ease;
}

.fake-chat-avatar {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  border: 3px solid var(--primary-blue);
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-pink), var(--primary-yellow));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.fake-chat-bubble {
  background: white;
  border-radius: 15px;
  padding: 10px 14px;
  max-width: 280px;
  border: 3px solid var(--primary-blue);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
  position: relative;
}

.fake-chat-username {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.fake-chat-badge {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #ffd700, #ffa500);
  text-align: center;
  font-size: 0.7rem;
  line-height: 18px;
  border: 2px solid white;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

.fake-chat-badge-discord {
  background: linear-gradient(to bottom, #5865F2, #4752C4);
  color: white;
  font-size: 0.65rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
}

.fake-chat-badge-discord:hover {
  transform: scale(1.1);
}

.fake-chat-text {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.4;
}

.fake-chat-typing {
  padding: 10px 15px;
  font-size: 0.9rem;
  color: var(--primary-purple);
  font-style: italic;
  background: rgba(157, 80, 187, 0.1);
  border-top: 2px dashed var(--primary-purple);
}

.fake-chat-disabled {
  text-align: center;
  padding: 15px;
  font-size: 1rem;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  font-weight: bold;
  border-top: 3px solid white;
}

.fake-chat-disabled a {
  color: #ffd700;
  text-decoration: underline;
  font-weight: bold;
  transition: transform 0.2s;
  display: inline-block;
}

.fake-chat-disabled a:hover {
  transform: scale(1.1);
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInMessage {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.8rem;
  }
  .nav-container {
    padding: 0 15px;
  }
  .main-logo {
    display: none;
  }
  
  .quick-actions-section {
    padding: 20px !important;
  }
  
  .action-btn-seo {
    font-size: 0.9rem;
    padding: 10px 15px;
  }
  
  .rating-form-section,
  .contact-form-section {
    padding: 20px !important;
  }
  
  .star-rating {
    font-size: 1.5rem !important;
  }
  
  .fake-chat-container {
    max-width: 100%;
    margin: 30px auto;
  }
  
  .fake-chat-messages {
    height: 350px;
  }
  
  .fake-chat-bubble {
    max-width: 220px;
  }
}
