/* Main Styles for Cheese Chompers 3D Website */

/* Custom Font Import */
@import url('https://fonts.googleapis.com/css2?family=Titan+One&family=Poppins:wght@300;400;500;700&display=swap');

/* Custom Variables */
:root {
  --cheese-yellow: #ffc107;
  --cheese-dark: #e6a100;
  --cheese-light: #fff8e1;
  --cheese-brown: #5d4037;
  --cheese-white: #ffffff;
}

/* Global Styles */
body {
  font-family: 'Poppins', sans-serif;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, .game-title {
  font-family: 'Titan One', cursive;
  letter-spacing: 0.05em;
}

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

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

/* Header Enhancements */
.logo-animation {
  animation: float 3s ease-in-out infinite;
}

/* Game Container Styles */
.game-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  max-width: 1000px;
  margin: 0 auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 15px 30px rgba(93, 64, 55, 0.3);
  border: none;
  background-color: #121212;
}

.game-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(93, 64, 55, 0.4);
}

.game-frame-border {
  position: relative;
  border: 12px solid #5d4037; /* 砖墙颜色 */
  border-radius: 12px;
  background-image: linear-gradient(45deg, #3e2723 25%, #4e342e 25%, #4e342e 50%, #3e2723 50%, #3e2723 75%, #4e342e 75%, #4e342e 100%);
  background-size: 20px 20px;
  padding: 8px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.game-frame-inner {
  position: relative;
  border: 4px solid #8d6e63; /* 浅砖色边框 */
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
}

.game-frame-wood {
  position: absolute;
  height: 20px;
  background-color: #a1887f;
  background-image: linear-gradient(90deg, rgba(121, 85, 72, 0.8) 0%, rgba(141, 110, 99, 0.3) 20%, rgba(141, 110, 99, 0.3) 80%, rgba(121, 85, 72, 0.8) 100%);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
}

.game-loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 20;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.game-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.game-controls-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-container:hover .game-controls-hint {
  opacity: 1;
}

.game-section {
  position: relative;
  background-color: #795548;
  padding: 3rem 0;
  background-image: url('data:image/svg+xml;utf8,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="30" height="30" fill="%236d4c41"/><rect x="30" y="30" width="30" height="30" fill="%236d4c41"/></svg>');
}

.game-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 20px;
  background-color: #5d4037;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background-color: #5d4037;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2);
}

@keyframes mouseRun {
  0% { transform: translateX(-100%) rotate(5deg); }
  100% { transform: translateX(100%) rotate(-5deg); }
}

.mouse-decoration {
  position: absolute;
  width: 30px;
  height: 20px;
  background-color: #9e9e9e;
  border-radius: 50% 40% 40% 50%;
  bottom: 25px;
  animation: mouseRun 8s linear infinite;
  z-index: 5;
}

.mouse-decoration::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #9e9e9e;
  border-radius: 50%;
  top: -5px;
  left: 5px;
}

.mouse-decoration::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 3px;
  background-color: #212121;
  border-radius: 2px;
  top: 2px;
  left: 2px;
}

/* YouTube trailer section */
.video-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  position: relative;
  background-color: #121212;
}

.video-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0 auto;
  max-width: 1200px;
}

@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.youtube-section {
  position: relative;
  background-color: #f8f4e5;
  padding: 3rem 0;
  background-image: linear-gradient(45deg, rgba(255, 193, 7, 0.1) 25%, transparent 25%, transparent 50%, rgba(255, 193, 7, 0.1) 50%, rgba(255, 193, 7, 0.1) 75%, transparent 75%, transparent);
  background-size: 40px 40px;
}

.youtube-section::before,
.youtube-section::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 15px;
  background-color: #ffc107;
  z-index: 1;
}

.youtube-section::before {
  top: 0;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.youtube-section::after {
  bottom: 0;
  box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.video-title {
  padding: 16px;
  font-weight: 600;
  color: #5d4037;
  font-size: 1.1rem;
  text-align: center;
  background-color: #fff8e1;
  border-top: 2px solid #ffc107;
}

.cheese-accent {
  position: absolute;
  width: 40px;
  height: 40px;
  background-color: #ffc107;
  border-radius: 50%;
  z-index: 2;
}

.cheese-accent.top-left {
  top: -10px;
  left: -10px;
}

.cheese-accent.bottom-right {
  bottom: -10px;
  right: -10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .game-container {
    width: 100%;
  }
}

/* 新的Header样式 - 基于游戏截图色调 */
.game-header {
  background-color: #5d4037; /* 砖墙棕色 */
  background-image: url('data:image/svg+xml;utf8,<svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="15" height="15" fill="%234e342e"/><rect x="15" y="15" width="15" height="15" fill="%234e342e"/></svg>');
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-bottom: 4px solid #8d6e63; /* 浅砖色边框 */
  padding: 0.5rem 0;
}

.game-title {
  color: #f5f5f5;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: pulse 3s ease-in-out infinite;
}

.logo-animation {
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

/* Feature section enhancements */
.feature-group {
  transition: all 0.3s ease;
}

.feature-image {
  height: 300px;
  object-fit: cover;
  transition: transform 0.5s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-image-container {
  overflow: hidden;
  border-radius: 0.75rem;
  position: relative;
}

.feature-image-container:hover .feature-image {
  transform: scale(1.05);
}

.feature-content {
  position: relative;
  z-index: 1;
  border-top: 4px solid var(--cheese-yellow);
}

.feature-content p {
  line-height: 1.8;
  }
  
.feature-header h3 {
  position: relative;
  display: inline-block;
}

.feature-header h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--cheese-yellow);
}

@media (max-width: 768px) {
  .feature-image {
    height: 200px;
  }
  
  .feature-header {
    text-align: center;
  }
  
  .feature-header h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Fullscreen button styles */
.fullscreen-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.fullscreen-button:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.fullscreen-button svg {
  width: 22px;
  height: 22px;
}

.game-container:hover .fullscreen-button {
  opacity: 1;
} 