/* ============================================
   RESET & VARIABLES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #fbbf24;
  --color-primary-hover: #f59e0b;
  --color-secondary: #a855f7;
  --color-bg-dark: #0f172a;
  --color-bg-darker: #1e293b;
  --color-bg-card: #1e293b;
  --color-text-white: #ffffff;
  --color-text-gray: #d1d5db;
  --color-text-muted: #9ca3af;
  --color-border: rgba(168, 85, 247, 0.2);
  --color-border-dark: rgba(168, 85, 247, 0.1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease-out;
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

html, body {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1a1f35 100%);
  color: var(--color-text-white);
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================
   HEADER & NAVBAR
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  height: 65px;
}

.navbar {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--color-text-white);
  transition: var(--transition-fast);
}

.logo {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--color-text-white);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.register-btn {
  display: none;
}

@media (max-width: 768px) {
  .menu-btn {
    display: flex;
  }

  .register-btn {
    display: inline-block;
  }
}

/* ============================================
   LAYOUT WRAPPER
   ============================================ */

.layout-wrapper {
  display: flex;
  flex: 1;
  gap: 0;
  height: calc(100vh - 65px);
  overflow: hidden;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  width: 256px;
  background: rgba(15, 23, 42, 0.5);
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--color-text-gray);
  border-left: 2px solid transparent;
}

.sidebar-item:hover {
  background: rgba(168, 85, 247, 0.2);
  color: var(--color-text-white);
}

.sidebar-item.active {
  background: rgba(168, 85, 247, 0.4);
  border-left-color: var(--color-primary);
  color: var(--color-text-white);
}

.sidebar-item .icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.sidebar-item .label {
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 65px;
    left: 0;
    height: calc(100vh - 65px);
    width: 256px;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    background: var(--color-bg-darker);
  }

  .sidebar.open {
    transform: translateX(0);
  }
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px;
}

@media (max-width: 768px) {
  .main-content {
    padding-bottom: 100px;
  }
}

/* ============================================
   SECTIONS & SPACING
   ============================================ */

section {
  padding: 32px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 768px) {
  section {
    padding: 16px;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.hero-image {
  border-radius: 12px;
  overflow: hidden;
  height: 384px;
  box-shadow: var(--shadow-lg);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.welcome-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.welcome-title {
  font-size: 32px;
  font-weight: bold;
  line-height: 1.2;
}

.welcome-subtitle {
  color: rgba(168, 85, 247, 0.8);
  font-size: 14px;
  font-weight: 500;
}

.auth-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-label {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-image {
    height: 320px;
  }

  .welcome-title {
    font-size: 28px;
  }
}

/* ============================================
   RAFFLE SECTION
   ============================================ */

.raffle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.raffle-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
}

.raffle-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 16px;
}

.raffle-title .amount {
  color: var(--color-primary);
}

.raffle-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.timer {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-gray);
}

.timer .icon {
  font-size: 16px;
}

.timer .time {
  font-size: 14px;
  font-weight: 500;
}

.raffle-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: auto;
  min-height: 320px;
  box-shadow: var(--shadow-lg);
}

.raffle-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.raffle-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(10px);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .raffle-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .raffle-card {
    padding: 20px;
  }

  .raffle-title {
    font-size: 24px;
  }

  .raffle-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .raffle-image {
    min-height: 280px;
  }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  width: 100%;
  background: var(--color-primary);
  color: var(--color-bg-darker);
  padding: 16px 24px;
  font-size: 16px;
  box-shadow: 0 10px 25px rgba(251, 191, 36, 0.2);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 15px 30px rgba(251, 191, 36, 0.3);
}

.btn-secondary {
  background: var(--color-primary);
  color: var(--color-text-white);
  padding: 10px 20px;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(251, 191, 36, 0.2);
}

.btn-secondary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 12px 25px rgba(251, 191, 36, 0.3);
}

.btn-auth {
  width: 100%;
  background: var(--color-bg-card);
  color: var(--color-text-white);
  border: 1px solid var(--color-border-dark);
  padding: 12px 16px;
  font-size: 14px;
}

.btn-auth:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--color-border);
}

.btn-unlock {
  width: 100%;
  background: var(--color-primary);
  color: var(--color-bg-darker);
  padding: 16px 24px;
  font-size: 16px;
  box-shadow: var(--shadow-xl);
}

.btn-unlock:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 20px 35px rgba(251, 191, 36, 0.3);
}

.nav-btn {
  background: none;
  border: none;
  color: var(--color-text-white);
  cursor: pointer;
  padding: 8px 16px;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.nav-btn:hover {
  color: var(--color-primary);
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--color-bg-darker);
  border-top: 1px solid var(--color-border);
  z-index: 50;
  padding-bottom: max(env(safe-area-inset-bottom), 0);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  height: 100%;
  font-size: 12px;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--color-primary);
}

.bottom-nav-item .icon {
  font-size: 20px;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
    justify-content: space-around;
  }

  .layout-wrapper {
    height: calc(100vh - 65px);
  }
}

/* ============================================
   BLUR OVERLAY
   ============================================ */

.blur-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 35;
  backdrop-filter: blur(0px);
  transition: backdrop-filter 0.5s ease-out;
}

.blur-overlay.active-blur-1 {
  backdrop-filter: blur(3px);
}

.blur-overlay.active-blur-2 {
  backdrop-filter: blur(8px);
}

/* ============================================
   MODAL
   ============================================ */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.5s ease-out;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: linear-gradient(135deg, #1e293b 0%, #1a1f35 100%);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 32px;
  max-width: 448px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  margin-bottom: 28px;
}

.modal-title {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 12px;
}

.modal-title .highlight {
  color: var(--color-primary);
}

.modal-subtitle {
  color: var(--color-text-gray);
  font-size: 14px;
  font-weight: 500;
}

.limited-offer {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.offer-label {
  color: rgba(251, 191, 36, 0.8);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.offer-text {
  color: var(--color-text-white);
  font-size: 14px;
  font-weight: bold;
  margin-top: 8px;
}

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.benefit-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.benefit-icon {
  font-size: 24px;
  color: var(--color-primary);
  flex-shrink: 0;
  min-width: 32px;
  text-align: center;
}

.benefit-content {
  flex: 1;
}

.benefit-content h4 {
  font-size: 14px;
  font-weight: bold;
  color: var(--color-text-white);
  margin-bottom: 4px;
}

.benefit-content p {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes popIn {
  from {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.6);
}
