/* 7xstudio - Memory Match Stylesheet (2026) */
/* STRICTLY FLAT COLORS - NO GLOWS, NO NEON, NO SHADOW BLURS */

:root {
  --flat-blue: #3b82f6;
  --flat-cyan: #06b6d4;
  --flat-magenta: #d946ef;
  --flat-green: #10b981;
  --flat-orange: #f97316;
  --flat-red: #ef4444;
  --flat-gray: #6b7280;
  --dark-bg: #0f172a;
  --card-bg: #1e293b;
  --border-color: #334155;
  --panel-bg: rgba(30, 41, 59, 0.9);
}

html, body {
  height: 100%;
  height: -webkit-fill-available;
  background-color: var(--dark-bg);
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  overflow: hidden;
}

/* Aspect ratio 9:16 layout constraint overrides */
.game-wrapper {
  position: relative;
  width: 100vw;
  width: 100dvw;
  height: 177.78vw;
  height: 177.78dvw;
  max-width: 450px;
  max-height: 800px;
  background: #0f172a;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3) !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  border: 2px solid var(--border-color);
  box-sizing: border-box;
  padding: 0 !important;
}

@media (min-aspect-ratio: 9/16) {
  .game-wrapper {
    height: 100vh;
    height: 100dvh;
    width: 56.25vh;
    width: 56.25dvh;
  }
}

/* Ensure gameplay partner layer is relative and constrained inside wrapper */
.partner-panel-layout {
  position: relative !important;
  width: 100% !important;
  height: 64px !important;
  background: #0f172a !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  z-index: 100 !important;
  top: 0 !important;
  left: 0 !important;
}

/* Ensure gameplay partner layer bottom is relative and constrained inside wrapper */
.partner-panel-layout-bottom {
  position: relative !important;
  width: 100% !important;
  height: 64px !important;
  background: #0f172a !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  z-index: 100 !important;
  bottom: 0 !important;
  left: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.partner-panel-layout-bottom.hidden,
.layout-divider.hidden {
  display: none !important;
}

/* Partner Box formatting */
.partner-holder-top, .partner-holder-bottom {
  width: 320px !important;
  height: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
}

/* Ensure HUD is relative and fits exactly under the ad banner */
.hud-layer {
  position: relative !important;
  width: 100% !important;
  height: 45px !important;
  background: #1e293b !important;
  border-bottom: 2px solid var(--flat-blue) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0 12px !important;
  margin: 0 !important;
  z-index: 99 !important;
  box-sizing: border-box !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
}

/* Canvas container fills the rest of the height */
.canvas-container {
  position: relative;
  width: 100% !important;
  flex: 1 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: hidden;
  background-color: #0b0f19;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  border: none !important;
}

/* Canvas dimensions managed automatically by container */
#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  background-color: #0b0f19;
}



.hud-fullscreen-btn, .hud-reset-btn, .hud-volume-btn {
  background: none !important;
  border: none !important;
  color: var(--flat-blue) !important;
  cursor: pointer !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s ease !important;
  outline: none !important;
  height: 100% !important;
}

.hud-fullscreen-btn:hover, .hud-volume-btn:hover {
  transform: scale(1.1) !important;
  color: #ffffff !important;
}

.hud-reset-btn:hover {
  transform: rotate(45deg) scale(1.1) !important;
  color: #ffffff !important;
}

.hud-fullscreen-btn svg, .hud-reset-btn svg, .hud-volume-btn svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
  display: block !important;
}

/* Overlay card updates - FLAT colors, NO GLOWS */
.overlay-layer {
  background: rgba(15, 23, 42, 0.9) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.overlay-card {
  background: #1e293b !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

.start-card {
  border: 1px solid var(--flat-blue) !important;
}

.game-over-card {
  border: 1px solid var(--flat-red) !important;
}

.level-clear-card {
  border: 1px solid var(--flat-green) !important;
  max-width: 320px;
}

/* Brand Header on top of Card */
.menu-brand-header {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 15px;
  padding: 0 10px;
}

.brand-logo {
  height: 24px;
  filter: none !important;
  border: none;
}

/* Dividers */
.layout-divider {
  width: 100%;
  height: 2px;
  background: var(--border-color) !important;
  box-shadow: none !important;
}

/* Custom Overlays for Status HUD inside Canvas Container */
.game-status-overlay {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  z-index: 10;
  text-shadow: none !important;
}

#status-level {
  color: var(--flat-blue) !important;
}

#status-moves {
  color: var(--flat-magenta) !important;
}

#status-time {
  color: var(--flat-orange) !important;
}

.cumulative-score-overlay {
  position: absolute;
  top: 44px;
  left: 15px;
  right: 15px;
  text-align: center;
  pointer-events: none;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.8px;
  z-index: 10;
  color: #ffffff;
  text-shadow: none !important;
}

/* Typography styles */
.logo-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.1;
  text-shadow: none !important;
}

.title-line-1 {
  color: var(--flat-blue) !important;
}

.title-line-2 {
  color: var(--flat-cyan) !important;
}

.neon-text-green {
  color: var(--flat-green) !important;
  text-shadow: none !important;
  font-weight: 800;
  text-align: center;
  margin-top: 10px;
}

.neon-text-red {
  color: var(--flat-red) !important;
  text-shadow: none !important;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.score-display {
  background: #0f172a !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.score-value {
  font-weight: 800;
  font-size: 16px;
  color: #ffffff;
}

/* UI transition animations */
.animate-pop {
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes popIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Ads layout adjustments */
.partner-slot-wrapper {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.partner-label {
  font-size: 9px;
  letter-spacing: 1px;
  opacity: 0.4;
}

.partner-box-large {
  width: 300px;
  height: 250px;
  background: #0f172a !important;
  border: 1px dashed var(--border-color) !important;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

/* Double Button Row Layout */
.button-row-double {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  margin-bottom: 5px;
}

/* Flat Cyberpunk Pill Buttons */
.menu-btn {
  background: #2b8880 !important;
  border: 2px solid #00f3ff !important;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
  border-radius: 30px !important;
  padding: 11px 16px !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
  text-transform: uppercase;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.4) !important;
}

.menu-btn:hover {
  background: #00f3ff !important;
  color: #0b0f19 !important;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.8) !important;
  transform: translateY(-1px);
}

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

/* Full Width Primary Play Button (Flat Teal Cyan Border) */
.main-start-btn {
  width: 100% !important;
  margin-top: 8px;
  margin-bottom: 8px;
  flex: none;
  font-size: 14px;
  background: #2b8880 !important;
  border: 2px solid #00f3ff !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.4) !important;
}

.main-start-btn:hover {
  background: #00f3ff !important;
  color: #0b0f19 !important;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.8) !important;
}

.neon-border-green {
  border-color: var(--flat-green) !important;
}
.neon-border-green:hover {
  background: var(--flat-green) !important;
  color: #0f172a !important;
}

.neon-border-red {
  border-color: var(--flat-red) !important;
}
.neon-border-red:hover {
  background: var(--flat-red) !important;
  color: #ffffff !important;
}

/* Pill Shaped Transparent Outline Return Button */
.home-link-pill {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(0, 243, 255, 0.4) !important;
  color: #00f3ff !important;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1px;
  border-radius: 30px;
  padding: 10px 24px;
  transition: all 0.2s ease;
  margin-top: 15px;
  margin-bottom: 4px;
  display: inline-block;
  text-transform: uppercase;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.2) !important;
}

.home-link-pill:hover {
  background: rgba(0, 243, 255, 0.1) !important;
  border-color: #00f3ff !important;
  color: #ffffff !important;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.5) !important;
}

/* Description styling */
.menu-desc {
  font-size: 13px;
  color: #94a3b8 !important;
  line-height: 1.5;
  margin-top: 8px;
  margin-bottom: 12px;
  text-align: center;
  max-width: 90%;
}

/* Compact overrides for start menus on smaller viewports */
@media (max-height: 720px) {
  .overlay-card {
    padding: 16px 15px !important;
  }
  .logo-title {
    font-size: 26px !important;
  }
  .menu-desc {
    font-size: 11px !important;
    margin-bottom: 6px !important;
    line-height: 1.3 !important;
  }
  .menu-btn {
    padding: 8px 12px !important;
    font-size: 11px !important;
  }
  .button-row-double {
    margin-top: 8px !important;
  }
  .main-start-btn {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
  }
  .home-link-pill {
    margin-top: 4px !important;
    margin-bottom: 2px !important;
    padding: 6px 16px !important;
    font-size: 10px !important;
  }
  .partner-slot-wrapper {
    margin-top: 6px !important;
  }
}

/* Floating Trophy for WR */
.trophy-container {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  background: #f59e0b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 10;
}
