/* 🦐 蝦蝦金錢豹 - 頂級 virtual hotel 風格 */

/* ========== CSS Variables ========== */
:root {
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a25;
  
  /* 奢華金色系 */
  --gold-primary: #d4af37;
  --gold-light: #f4e4a6;
  --gold-dark: #aa8c2c;
  
  /* 牡丹紅 */
  --red-primary: #c41e3a;
  --red-light: #e8425a;
  --red-dark: #8b1428;
  
  /* 文字 */
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.7);
  --text-muted: rgba(255,255,255,0.5);
  
  /* 邊框 */
  --border-color: rgba(212,175,55,0.3);
  --border-light: rgba(212,175,55,0.1);
  
  /* 陰影 */
  --shadow-gold: 0 4px 20px rgba(212,175,55,0.3);
  --shadow-red: 0 4px 20px rgba(196,30,58,0.3);
  
  /* 間距 */
  --nav-height: 70px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Microsoft JhengHei', 'PingFang TC', Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* 星空背景 */
.stars-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background: 
    radial-gradient(ellipse at bottom, #1a1a3a 0%, transparent 70%),
    radial-gradient(circle at 20% 80%, rgba(196,30,58,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(212,175,55,0.1) 0%, transparent 50%);
}

.stars-bg::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 100px 50px, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 200px 150px, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 300px 250px, rgba(255,255,255,0.4), transparent),
    radial-gradient(2px 2px at 400px 100px, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 500px 300px, rgba(255,255,255,0.3), transparent);
  animation: twinkle 8s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ========== Typography ========== */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: var(--gold-primary);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--gold-light);
}

/* ========== Navbar ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  z-index: 1000;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 0 10px rgba(212,175,55,0.5);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a:hover {
  color: var(--gold-primary);
  background: rgba(212,175,55,0.1);
}

.nav-links a.active {
  color: var(--gold-primary);
  background: rgba(212,175,55,0.15);
}

.auth-link {
  margin-left: 15px;
  padding-left: 15px;
  border-left: 1px solid var(--border-light);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--gold-primary);
  border-radius: 3px;
  transition: all 0.3s;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #000;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(212,175,55,0.4);
}

.btn-red {
  background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
  color: #fff;
  box-shadow: var(--shadow-red);
}

.btn-red:hover {
  background: linear-gradient(135deg, var(--red-light), var(--red-primary));
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(196,30,58,0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--gold-primary);
  color: var(--gold-primary);
}

.btn-outline:hover {
  background: rgba(212,175,55,0.15);
  color: var(--gold-light);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ========== Cards ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 30px;
  transition: all 0.3s;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
  transform: translateY(-4px);
}

/* ========== Forms ========== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255,255,255,0.05);
  border: 2px solid var(--border-light);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 16px;
  transition: all 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold-primary);
  background: rgba(212,175,55,0.05);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* ========== Main Content ========== */
.main-content {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Hero Section ========== */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 60px 20px;
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  font-size: clamp(48px, 10vw, 96px);
  margin-bottom: 20px;
  animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
  from { 
    text-shadow: 0 0 20px rgba(212,175,55,0.5); 
    color: var(--gold-primary);
  }
  to { 
    text-shadow: 0 0 40px rgba(212,175,55,0.8), 0 0 80px rgba(212,175,55,0.4);
    color: var(--gold-light);
  }
}

.hero p {
  font-size: clamp(18px, 4vw, 28px);
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== Features ========== */
.features {
  padding: 100px 20px;
}

.section-title {
  text-align: center;
  font-size: clamp(32px, 6vw, 48px);
  margin-bottom: 15px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 50px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature-card {
  text-align: center;
  padding: 40px 30px;
}

.feature-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.feature-card h3 {
  font-size: 24px;
  margin-bottom: 15px;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== Stats ========== */
.stats {
  background: var(--bg-card);
  padding: 80px 20px;
  text-align: center;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 80px;
  flex-wrap: wrap;
}

.stat-item h2 {
  font-size: clamp(36px, 8vw, 60px);
  color: var(--gold-primary);
  margin-bottom: 10px;
}

.stat-item p {
  color: var(--text-secondary);
  font-size: 16px;
}

/* ========== Auth Pages ========== */
.auth-page {
  display: flex;
 align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
}

.auth-header {
  text-align: center;
  margin-bottom: 40px;
}

.auth-header h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.auth-header p {
  color: var(--text-secondary);
}

.auth-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
}

/* ========== Dashboard ========== */
.dashboard {
  padding: 40px 20px;
}

.dashboard-header {
  margin-bottom: 40px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 30px;
  background: var(--bg-card);
  border-radius: 16px;
  margin-bottom: 30px;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-primary), var(--red-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.user-details h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(212,175,55,0.15);
  border-radius: 20px;
  font-size: 14px;
  color: var(--gold-primary);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  padding: 25px;
}

.stat-card h3 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.stat-card .value {
  font-size: 32px;
  font-weight: 700;
  color: var(--gold-primary);
}

/* ========== Wheel ========== */
.wheel-section {
  text-align: center;
  padding: 40px;
}

.wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.wheel-wrapper {
  position: relative;
}

.wheel {
  width: min(320px, 80vw);
  height: min(320px, 80vw);
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #d4af37 0deg 51.4deg,
    #f4e4a6 51.4deg 102.8deg,
    #d4af37 102.8deg 154.3deg,
    #f4e4a6 154.3deg 205.7deg,
    #d4af37 205.7deg 257.1deg,
    #f4e4a6 257.1deg 308.6deg,
    #d4af37 308.6deg 360deg
  );
  box-shadow: 0 0 50px rgba(212,175,55,0.5);
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.wheel.spinning {
  transform: rotate(1440deg);
}

.wheel-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  height: 50%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-dark));
  border: 4px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-shadow: 0 0 20px rgba(212,175,55,0.3);
}

.spins-info {
  margin: 20px 0;
  font-size: 20px;
  color: var(--text-secondary);
}

.spins-info span {
  color: var(--gold-primary);
  font-size: 28px;
  font-weight: 700;
}

.prizes-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 40px;
  width: 100%;
  max-width: 800px;
}

.prize-item {
  padding: 15px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.prize-item.winner {
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-gold);
  animation: pulse 0.5s ease-in-out infinite;
}

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

/* ========== Toast Notification ========== */
.toast-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9999;
}

.toast {
  padding: 16px 24px;
  background: var(--bg-card);
  border-radius: 12px;
  border-left: 4px solid var(--gold-primary);
  color: var(--text-primary);
  margin-bottom: 10px;
  animation: slideIn 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.toast.error {
  border-left-color: var(--red-primary);
}

.toast.success {
  border-left-color: #22c55e;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ========== Modal ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--gold-primary);
}

.modal .prize-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

/* ========== Lottery ========== */
.lottery-section {
  padding: 60px 20px;
  text-align: center;
}

.lottery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.lottery-card {
  padding: 30px 20px;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.lottery-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-4px);
}

.lottery-card .emoji {
  font-size: 48px;
  margin-bottom: 15px;
}

.lottery-card .name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.lottery-card .style {
  font-size: 14px;
  color: var(--text-secondary);
}

.lottery-result {
  text-align: center;
  padding: 60px;
}

.result-emoji {
  font-size: 120px;
  animation: bounce 0.5s ease;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* ========== Memory ========== */
.memory-section {
  padding: 40px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.memory-form {
  margin-bottom: 40px;
}

.memory-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.memory-item {
  padding: 25px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
}

.memory-date {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.memory-content {
  font-size: 18px;
  line-height: 1.7;
}

/* ========== Footer ========== */
.footer {
  padding: 40px 20px;
  text-align: center;
  border-top: 1px solid var(--border-light);
  margin-top: 60px;
}

.footer p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10,10,15,0.98);
    flex-direction: column;
    padding: 20px;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 999;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
  }
  
  .nav-links li {
    border-bottom: 1px solid var(--border-light);
  }
  
  .nav-links a {
    display: block;
    padding: 15px;
    font-size: 18px;
  }
  
  .auth-link {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--border-light);
    margin-top: 15px;
    padding-top: 15px;
  }
  
  .navbar {
    padding: 0 20px;
  }
  
  .hero h1 {
    font-size: 42px;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .hero .btn {
    width: 100%;
  }
  
  .stats-grid {
    gap: 40px;
  }
  
  .user-info {
    flex-direction: column;
    text-align: center;
  }
  
  .auth-card {
    padding: 30px 20px;
  }
}

/* ========== Utility Classes ========== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }