/* Flasai Billing - Glassmorphism Style */

:root {
  --primary: #ff6b35;
  --primary-light: #ff8c42;
  --primary-dark: #e55a2a;
  --primary-glow: rgba(255, 107, 53, 0.4);
  --black: #000000;
  --black-light: #0a0a0a;
  --black-lighter: #141414;
  --gray: #222222;
  --gray-light: #333333;
  --gray-lighter: #555555;
  --white: #ffffff;
  --glass-bg: rgba(20, 20, 20, 0.7);
  --glass-border: rgba(255, 107, 53, 0.15);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Unbounded', sans-serif;
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(255, 140, 66, 0.1) 0%, transparent 50%),
    var(--black);
  animation: bgShift 20s ease-in-out infinite;
}

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

/* Particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.particles::before,
.particles::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.03;
  animation: float 30s ease-in-out infinite;
}

.particles::before {
  width: 150px;
  height: 150px;
  top: 15%;
  left: 15%;
  animation-delay: 0s;
}

.particles::after {
  width: 100px;
  height: 100px;
  bottom: 25%;
  right: 20%;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(60px, 0) scale(1); }
  75% { transform: translate(30px, 30px) scale(0.95); }
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.03),
    transparent
  );
  animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardAppear {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(30px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Typography */
.auth-title {
  text-align: center;
  margin-bottom: 32px;
}

.auth-title h1 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.auth-title p {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--gray-lighter);
  font-weight: 400;
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-lighter);
  transition: color 0.3s;
}

.form-group:focus-within label {
  color: var(--primary);
}

.form-group input {
  width: 100%;
  padding: 14px;
  padding-left: 44px;
  font-family: 'Unbounded', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--white);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-group input::placeholder {
  color: var(--gray-lighter);
}

.form-group input:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.2);
}

.form-group input:focus + .input-icon {
  color: var(--primary);
  transform: scale(1.1);
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--gray-lighter);
  transition: all 0.3s;
  pointer-events: none;
}

.form-group label ~ .input-icon {
  top: calc(50% + 12px);
}

/* Button */
.btn {
  padding: 14px 24px;
  font-family: 'Unbounded', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

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

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn.btn-secondary {
  background: transparent;
  border: 1px solid var(--glass-border);
}

.btn.btn-secondary:hover {
  background: rgba(255, 107, 53, 0.1);
}

.btn.btn-danger {
  background: linear-gradient(135deg, #ff4757 0%, #c0392b 100%);
}

.btn.btn-danger:hover {
  box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
}

.btn.block {
  width: 100%;
}

/* Messages */
.message {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
  animation: messageAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes messageAppear {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.success {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: #2ecc71;
}

.message.error {
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: #ff4757;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Auth Link */
.auth-link {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--gray-lighter);
}

.auth-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.auth-link a:hover {
  color: var(--primary-light);
}

/* Main Content */
.main {
  padding: 40px 20px;
  min-height: calc(100vh - 80px);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title .icon {
  font-size: 1.8rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: rgba(255, 107, 53, 0.15);
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-lighter) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-lighter);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-state .icon {
  font-size: 5rem;
  margin-bottom: 20px;
  animation: glow 2s ease-in-out infinite;
  display: inline-block;
  cursor: default;
  transition: all 0.3s ease;
}

.empty-state .icon:hover {
  text-shadow: 0 0 40px rgba(255, 107, 53, 0.8);
  transform: scale(1.2);
}

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
    transform: scale(1);
  }
  50% {
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.6);
    transform: scale(1.05);
  }
}

.empty-state h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 1rem;
  color: var(--gray-lighter);
  max-width: 400px;
  margin: 0 auto;
}

/* Profile Form */
.profile-form {
  max-width: 500px;
  padding: 32px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

/* Avatar Color Picker */
.color-picker {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.color-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  border: 3px solid transparent;
}

.color-option:hover {
  transform: scale(1.15);
}

.color-option.active {
  border-color: var(--white);
  box-shadow: 0 0 15px currentColor;
}

/* Section */
.section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--gray-lighter);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 2px;
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.table th {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-lighter);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  font-size: 0.95rem;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: rgba(255, 107, 53, 0.05);
}

/* Info Row */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.2s;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row:hover {
  background: rgba(255, 107, 53, 0.05);
}

.info-row .label {
  font-size: 0.9rem;
  color: var(--gray-lighter);
}

.info-row .value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--white);
}

.info-row .value.muted {
  color: var(--gray-light);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .auth-container {
    padding: 32px 24px;
  }

  .form-row {
    flex-direction: column;
    gap: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 1.5rem;
  }
}

/* Loader */
.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 107, 53, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Emoji Glow Effect */
.stat-icon,
.page-title .icon,
.avatar-menu-item .icon,
.input-icon {
  transition: all 0.3s ease;
}

.stat-icon:hover,
.page-title .icon:hover {
  text-shadow: 0 0 20px var(--primary-glow);
  transform: scale(1.1);
}

.avatar-menu-item:hover .icon {
  text-shadow: 0 0 15px var(--primary-glow);
  transform: scale(1.2);
}

/* Layout with Sidebar */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 90;
  transition: transform 0.3s ease;
}

.sidebar.closed {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--glass-border);
}

.sidebar-logo {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-lighter);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  margin-bottom: 4px;
}

.nav-item:hover {
  background: rgba(255, 107, 53, 0.1);
  color: var(--primary);
}

.nav-item.active {
  background: rgba(255, 107, 53, 0.15);
  color: var(--primary);
}

.nav-item .icon {
  font-size: 1.1rem;
}

.nav-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 12px 0;
}

.main-wrapper {
  flex: 1;
  margin-left: 0;
}

.content-area {
  min-height: 100vh;
}

/* Diamond Display */
.diamond-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

.diamond-icon {
  font-size: 1rem;
  animation: spinDiamond 3s ease-in-out infinite;
}

@keyframes spinDiamond {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}

/* AFK Card */
.afk-card {
  max-width: 400px;
  padding: 40px;
  text-align: center;
}

.afk-timer {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--white) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 20px 0;
}

.afk-diamonds {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
}

.afk-timer-container {
  position: relative;
  display: inline-block;
}

.afk-timer-container::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px solid var(--primary);
  border-radius: 30px;
  opacity: 0.3;
  animation: pulseBorder 2s ease-in-out infinite;
}

@keyframes pulseBorder {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.02); }
}

/* Claim Animation */
.claim-animation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1000;
}

.claim-animation .diamond {
  font-size: 6rem;
  animation: claimFloat 1s ease-out forwards;
}

@keyframes claimFloat {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: translateY(0) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scale(1);
  }
}

/* Promo Input */
.promo-input-container {
  display: flex;
  gap: 12px;
}

.promo-input-container input {
  flex: 1;
}

.promo-input-container button {
  white-space: nowrap;
}

/* Table Responsive */
.table-responsive {
  overflow-x: auto;
}

.table-responsive .table {
  min-width: 800px;
}

/* Mobile Sidebar */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 100;
  }

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

  .main-wrapper {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: flex;
  }
}