/* ========== THEME COLORS ========== */
:root {
  --bg-dark: #121212;
  --bg-gradient: linear-gradient(to bottom, #161616, #1a1a1a, #121212);
  --accent-red: #e63946;
  --text-light: #ffffff;
  --text-soft: #cccccc;
  --card-bg: #1a1a1a;
  --card-shadow: rgba(0, 0, 0, 0.5);
}

/* ========== BASE RESET ========== */
* {
  box-sizing: border-box;
  transition: all 0.25s ease;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-light);
  overflow-x: hidden;
}

/* Universal Hover for clickable elements */
a:hover, button:hover, .tutorial-card:hover, .floating-nav button:hover, .social-links img:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Remove underline globally but allow article links */
a {
  text-decoration: none;
  color: inherit;
}

.tutorial-content a {
  color: var(--accent-red);
  text-decoration: underline;
  font-weight: bold;
}

/* ========== HEADER ========== */
header {
  text-align: center;
  padding: 4rem 2rem 2rem;
}

.logo {
  width: 90px;
  height: auto;
  border-radius: 50%;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
  font-weight: bold;
  color: var(--text-light);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-soft);
}

/* ========== MAIN TUTORIAL CONTENT STYLING ========== */
.tutorial-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  color: #fff;
}

/* ========== SECTION SPACING ========== */
section {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 4rem;
  margin-top: 4rem;
}

header + section {
  border-top: none;
}

/* ========== TUTORIAL CARDS ========== */
.tutorial-feed {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 2rem;
  max-width: 1000px;
  margin: auto;
}

.tutorial-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 2px solid #000;
  box-shadow: 0 0 16px var(--card-shadow);
  cursor: pointer;
  transition: all 0.25s ease;
}

.tutorial-thumb {
  width: 280px;
  height: auto;
  border-radius: 0.5rem;
  border: 2px solid #000;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.tutorial-info {
  flex: 1;
}

.tutorial-info h2 {
  font-size: 1.5rem;
  color: var(--accent-red);
  margin: 0 0 0.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.tutorial-info p {
  color: var(--text-soft);
  margin: 0;
}

/* Mobile layout fallback */
@media (max-width: 768px) {
  .tutorial-card {
    flex-direction: column;
    text-align: center;
  }
  .tutorial-thumb {
    width: 100%;
    height: auto;
  }
}

/* ========== ABOUT SECTION ========== */
.about-section {
  max-width: 900px;
  margin: auto;
  color: var(--text-soft);
  text-align: center;
}

.about-section h2 {
  color: var(--accent-red);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.about-section p {
  font-size: 1.2rem;
  max-width: 850px;
  margin: auto;
  line-height: 1.8;
}

/* ========== SOCIAL SECTION ========== */
.social-section {
  text-align: center;
  margin: 2rem 0;
}

.social-section h2 {
  color: #ff4d4d; /* Red color for the heading */
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-links a img {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.social-links a img:hover {
  transform: scale(1.1); /* Slight zoom effect on hover */
}

/* ========== FOOTER ========== */
footer {
  width: 100%; /* Ensure the footer spans the full width */
  background: #0f0f0f; /* Dark background for the footer */
  color: var(--text-soft); /* Light grey text */
  text-align: center;
  padding: 2rem 0; /* Add padding for spacing */
  font-size: 0.9rem;
  border-top: 1px solid #222; /* Add a subtle border at the top */
  position: relative; /* Ensure it stays in the flow of the page */
  margin-top: 2rem; /* Add spacing above the footer */
}

footer a {
  color: var(--accent-red); /* Red color for links */
  text-decoration: none;
  margin: 0 0.5rem;
}

footer a:hover {
  text-decoration: underline; /* Add underline on hover */
}

/* ========== FLOATING NAVIGATION ========== */
.floating-nav {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1000;
}

.floating-nav button {
  background: var(--card-bg);
  border: 2px solid var(--accent-red);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px var(--card-shadow);
}

.floating-nav img {
  width: 24px;
  height: 24px;
}

/* ========== SEARCH DROPDOWN & AUTOCOMPLETE ========= */
.search-dropdown {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 300px;
  background: var(--card-bg);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1rem;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#search-input {
  width: 100%;
  padding: 0.8rem;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 4px;
  color: var(--text-light);
  font-size: 1rem;
}

#search-input:focus {
  outline: none;
  border-color: var(--accent-red);
}

#autocomplete-list {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.autocomplete-item {
  display: block;
  padding: 0.8rem;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.2s ease;
}

.autocomplete-item:hover {
  background: #252525;
  border-color: var(--accent-red);
  transform: translateX(5px);
}

/* Custom scrollbar for autocomplete list */
#autocomplete-list::-webkit-scrollbar {
  width: 8px;
}

#autocomplete-list::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 4px;
}

#autocomplete-list::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

#autocomplete-list::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* Info Table Styles Fix */
.info-table {
  border-top: 1px solid #333;
  margin-top: 1rem;
  width: 100%;
}

.info-row {
  display: flex;
  border-bottom: 1px solid #333;
  padding: 0.5rem 0;
}

.info-label {
  color: #ff4d4d;
  width: 120px;
  flex-shrink: 0;
}

.info-value {
  color: #ccc;
  flex: 1;
  word-break: break-word;
}

.main-content {
  flex: 1;
}

.main-content section {
  margin-bottom: 2rem;
}

.main-content h2 {
  color: #ff4d4d;
  margin-bottom: 1rem;
}

/* ========== PET SECTION ========== */
.pet-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  padding: 1rem;
}

.pet {
  text-align: center;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1.5rem;
  background-color: var(--card-bg);
  width: 200px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.pet:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
  border-color: var(--accent-red);
}

.pet img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 1rem;
  display: block;
  transition: transform 0.3s ease;
}

.pet:hover img {
  transform: scale(1.1);
}

.pet h3 {
  margin: 0.5rem 0;
  font-size: 1.2rem;
  color: var(--text-light);
}

.pet a {
  text-decoration: none;
  color: var(--text-light);
  display: block;
  height: 100%;
}

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

/* Pet Overview Section */
.pet-overview {
  display: flex;
  flex-wrap: wrap; /* Allows wrapping when content doesn't fit */
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.pet-chart {
  width: 300px;
  border: 1px solid #444;
  border-radius: 8px;
  background-color: var(--card-bg);
  padding: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
  flex-shrink: 0; /* Prevents the chart from shrinking */
}

.pet-chart img {
  max-width: 150px;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.pet-chart h2 {
  font-size: 1.5rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.pet-chart .pet-description {
  font-style: italic;
  color: var(--text-soft);
  margin-bottom: 1rem;
}

.pet-chart .pet-data {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.pet-chart .pet-data th,
.pet-chart .pet-data td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid #444;
}

.pet-chart .pet-data th {
  color: var(--accent-red);
  font-weight: bold;
}

.pet-chart .pet-data td {
  color: var(--text-soft);
}

/* Pet Text Section */
.pet-text {
  flex: 1; /* Takes up remaining space */
  min-width: 300px; /* Ensures it doesn't shrink too much */
}

.pet-text section {
  margin-bottom: 2rem;
}

.pet-text h2 {
  font-size: 1.5rem;
  color: var(--accent-red);
  margin-bottom: 0.5rem;
}

.pet-text p,
.pet-text ul {
  color: var(--text-light);
  line-height: 1.8;
}

/* New Styles for Pet Info Card */
/* Pet Info Card Styles */
.content-wrapper {
  display: flex;
  flex-direction: row-reverse;
  gap: 2rem;
  margin: 2rem 0;
  align-items: flex-start; /* Add this */
}

.pet-info-card {
  width: 300px;
  background: var(--card-bg);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1rem;
  flex-shrink: 0;
  position: sticky; /* Add this */
  top: 20px; /* Add this */
}

.pet-info-card img {
  width: 200px;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
}

.info-table {
  border-top: 1px solid #333;
  margin-top: 1rem;
  width: 100%;
  max-width: 300px; /* Add this */
}

.info-row {
  display: flex;
  border-bottom: 1px solid #333;
  padding: 0.5rem 0;
  max-width: 100%; /* Add this */
}

.info-label {
  color: #ff4d4d;
  width: 120px;
  flex-shrink: 0;
}

.info-value {
  color: #ccc;
  flex: 1;
  word-break: break-word;
  max-width: 180px; /* Add this */
}

.main-content {
  flex: 1;
}

.main-content section {
  margin-bottom: 2rem;
}

.main-content h2 {
  color: #ff4d4d;
  margin-bottom: 1rem;
}

/* Responsive Layout */
@media (max-width: 1024px) {
  .pet-overview {
    flex-direction: column; /* Stacks the chart and text vertically */
    align-items: center; /* Centers the content */
  }

  .pet-chart {
    margin-bottom: 2rem; /* Adds spacing between the chart and text */
  }

  .pet-text {
    text-align: left; /* Ensures text aligns properly */
    width: 100%; /* Ensures full width for text */
  }
}

/* ========== EGG TABLE STYLES ========== */
.egg-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.egg-table th,
.egg-table td {
  padding: 1.2rem;
  text-align: left;
  border: 1px solid #333;
  color: var(--text-light);
}

.egg-table th {
  background: #1f1f1f;
  font-weight: bold;
  color: var(--accent-red);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.egg-table tr {
  transition: background-color 0.2s ease;
}

.egg-table tr:hover {
  background: #252525;
}

.egg-table img {
  width: 40px;
  height: 40px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.egg-table span {
  display: block;
  text-align: center;
  margin-top: 0.5rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.egg-table td:nth-child(2) {
  color: #ffd700; /* Gold color for cost */
  font-weight: bold;
}

.egg-table td:last-child {
  color: #4caf50; /* Green color for probability */
  font-weight: bold;
}

/* Add these styles */

.game-embed {
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px var(--card-shadow);
}

.game-embed iframe {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

.pet-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  margin: 15px;
  text-align: center;
  box-shadow: 0 4px 6px var(--card-shadow);
  transition: transform 0.3s ease;
}

.pet-card:hover {
  transform: translateY(-5px);
}

.pet-image {
  width: 120px;
  height: 120px;
  margin-bottom: 15px;
}

.pet-description {
  color: var(--text-soft);
  margin: 10px 0;
}

.view-more {
  display: inline-block;
  padding: 8px 16px;
  background: var(--accent-red);
  color: var(--text-light);
  border-radius: 4px;
  text-decoration: none;
  margin-top: 10px;
  transition: background 0.3s ease;
}

.view-more:hover {
  background: #c62828;
}

.center-content {
  text-align: center;
}

.main-title {
  text-align: center;
  margin-bottom: 2rem;
}

.alert-content {
  text-align: center;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 6px var(--card-shadow);
  margin: 20px 0;
}

/* Event Card */
.event-card {
  background: var(--card-bg);
  border-radius: 8px;
  margin: 2rem auto;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 4px 6px var(--card-shadow);
  transition: transform 0.3s ease;
}

.event-card:hover {
  transform: translateY(-5px);
}

.event-card a {
  display: block;
  padding: 2rem;
  text-decoration: none;
  color: var(--text-light);
}

.event-card h2 {
  color: var(--accent-red);
  margin-bottom: 1rem;
}

/* Features Grid */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  padding: 1rem;
}

.feature-link {
  background: var(--card-bg);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1.5rem;
  width: 200px;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.feature-link:hover {
  transform: translateY(-5px);
  border-color: var(--accent-red);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.feature-link img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.feature-link h3 {
  color: var(--text-light);
  margin: 0;
  font-size: 1.2rem;
}

/* Games Section */
.games-section {
  padding: 2rem;
  margin: 2rem auto;
  max-width: 1200px;
}

.games-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: var(--text-light);
}

/* Game Section Popup */
.game-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.95);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--accent-red);
  color: white;
  z-index: 1000;
  text-align: center;
  max-width: 400px;
}

.game-popup h2 {
  color: var(--accent-red);
  margin-bottom: 1rem;
}

.game-popup p {
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.popup-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.popup-btn {
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.popup-btn.ok {
  background: var(--accent-red);
  color: white;
}

.popup-btn.learn {
  background: #333;
  color: white;
}

.popup-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* UGPhone Specific Styles */
.affiliate-card {
  background: var(--card-bg);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.affiliate-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-red);
}

.affiliate-card h2 {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.affiliate-card p {
  color: var(--text-soft);
  margin-bottom: 1.5rem;
}

.signup-button {
  display: inline-block;
  background: var(--card-bg);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1.5rem;
  width: 200px;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.signup-button:hover {
  transform: translateY(-5px);
  border-color: var(--accent-red);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.signup-button h3 {
  color: var(--text-light);
  margin: 0;
  font-size: 1.2rem;
}
