/* Lucky Tiles - Shared Common Styles */
/* Used across all Fortune Apps */

/* ==================== FONTS ==================== */
@font-face {
  font-family: "TAN Headline";
  src: url("../fonts/TANHEADLINE-Regular.otf") format("opentype"),
    url("../fonts/TANHEADLINE-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* ==================== CSS VARIABLES ==================== */
:root {
  /* Colors */
  --color-primary: #fd243d;
  --color-background: #fafafa;
  --color-text: #fd243d;

  /* Fonts */
  --font-headline: "TAN Headline", Impact, "Arial Black", sans-serif;
  --font-body: Georgia, serif;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Spacing */
  --spacing-xs: clamp(8px, 1.5vh, 12px);
  --spacing-sm: clamp(12px, 2vh, 16px);
  --spacing-md: clamp(16px, 3vh, 24px);
  --spacing-lg: clamp(24px, 4vh, 32px);
}

/* ==================== BACK BUTTON ==================== */
.back-button {
  position: absolute;
  top: clamp(10px, 1.5vh, 14px);
  left: clamp(10px, 1.5vw, 14px);
  z-index: 1001;
  width: clamp(32px, 7vw, 40px);
  height: clamp(32px, 7vw, 40px);
  color: rgba(253, 36, 61, 0.35);
  text-decoration: none;
  font-family: var(--font-system);
  font-size: clamp(16px, 3.5vw, 20px);
  font-weight: 300;
  border: none;
  background: transparent;
  transition: all 0.2s ease;
  pointer-events: auto;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-button:hover {
  color: rgba(253, 36, 61, 0.65);
  transform: translateX(-2px);
}

.back-button:active {
  color: rgba(253, 36, 61, 0.85);
  transform: scale(0.94);
}

/* ==================== HOME BUTTON ==================== */
.home-button {
  position: absolute;
  top: clamp(10px, 1.5vh, 14px);
  right: clamp(10px, 1.5vw, 14px);
  z-index: 1001;
  width: clamp(40px, 8vw, 50px);
  height: clamp(40px, 8vw, 50px);
  color: rgba(253, 36, 61, 0.35);
  text-decoration: none;
  font-family: var(--font-system);
  font-size: clamp(20px, 4.5vw, 26px);
  font-weight: 300;
  border: none;
  background: transparent;
  transition: all 0.2s ease;
  pointer-events: auto;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-button:hover {
  color: rgba(253, 36, 61, 0.65);
  transform: scale(1.05);
}

.home-button:active {
  color: rgba(253, 36, 61, 0.85);
  transform: scale(0.94);
}

/* ==================== LOGO ==================== */
#logo-link {
  position: absolute;
  top: clamp(8px, 0.5vh, 8px);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(69px, 12vw, 88px);
  height: auto;
  z-index: 1000;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.3s ease;
  touch-action: manipulation;
}

#logo-link:hover {
  opacity: 0.8;
}

#logo {
  width: 100%;
  height: auto;
  display: block;
}

/* ==================== TITLE & CREDITS ==================== */
#title {
  position: absolute;
  top: clamp(18px, 4.5vh, 40px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  text-align: center;
  color: var(--color-primary);
  pointer-events: none;
  width: 95%;
  max-width: 100%;
}

#title h1 {
  font-size: clamp(1.3rem, 6vw, 2.7rem);
  font-weight: normal;
  margin: 0;
  font-family: var(--font-headline);
  white-space: nowrap;
  overflow: visible;
}

#title p {
  font-size: clamp(0.8rem, 2.5vw, 1.2rem);
  font-weight: normal;
  font-family: var(--font-body);
  margin: 5px 0 0 0;
  opacity: 0.9;
}

#credit-link {
  color: var(--color-primary);
  text-decoration: none;
  pointer-events: auto;
  transition: opacity 0.3s ease;
  touch-action: manipulation;
  display: inline-block;
  padding: 5px 10px;
  margin: -5px -10px;
}

#credit-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* ==================== BUTTONS ==================== */
.fortune-button,
.share-button,
.roll-button {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid rgba(253, 36, 61, 0.6);
  padding: clamp(8px, 2vh, 12px) clamp(16px, 4vw, 32px);
  border-radius: 30px;
  font-size: clamp(13px, 3vw, 20px);
  font-weight: normal;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-body);
  transform-origin: center;
  text-shadow: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  max-width: 95vw;
  text-align: center;
}

.fortune-button:hover,
.share-button:hover,
.roll-button:hover {
  background: rgba(253, 36, 61, 0.1);
  border-color: rgba(253, 36, 61, 0.8);
  transform: scale(1.05);
}

.fortune-button:active,
.share-button:active,
.roll-button:active {
  background: rgba(253, 36, 61, 0.2);
  transform: scale(0.95);
}
