/* =========================================================
   STYLE.CSS - PREMIUM MODERN UNIFIED STYLESHEET
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

/* CSS VARIABLES FOR PREMIUM THEME */
:root {
  --primary: #10b981;
  /* Vibrant Emerald Green */
  --primary-dark: #059669;
  --primary-light: #d1fae5;
  --secondary: #3b82f6;
  /* Vibrant Blue */
  --accent: #f59e0b;
  /* Warm Amber */
  --danger: #ef4444;
  /* Rose Red */

  --bg-color: #0f172a;
  /* Deep Slate for background underlays */
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #f8fafc;

  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(16px);

  --glass-dark: rgba(15, 23, 42, 0.7);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

html,
body {
  min-height: 100vh;
  width: 100%;
  background: var(--bg-color);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* Base Dynamic Background Image */
body {
  background: url('619277813_17972497496990246_8371791558392300477_n.jpg') no-repeat center center fixed;
  background-size: cover;
  position: relative;
}

/* Glassy Dark Overlay for better contrast */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--glass-dark);
  backdrop-filter: blur(4px);
  z-index: 0;
  pointer-events: none;
}

/* MAIN APP CONTAINER */
.app {
  min-height: 100vh;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  padding-bottom: 90px;
}

/* =========================================
   COMPONENTS
   ========================================= */

/* Typography */
h1,
h2,
h3,
.balance .amount {
  font-family: 'Outfit', sans-serif;
}

/* Back Button */
.back-btn {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
  margin: 20px 20px;
  transition: var(--transition);
  text-decoration: none;
  width: fit-content;
}

.back-btn:hover {
  transform: translateY(-2px);
  background: #fff;
  color: var(--primary);
}

/* Buttons */
button[type="submit"],
.auth-btn,
.edit-btn,
.save-btn,
.product-card button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  width: 100%;
  display: inline-block;
}

button[type="submit"]:hover,
.auth-btn:hover,
.product-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

button[type="submit"]:active,
.auth-btn:active {
  transform: translateY(0);
}

/* Universal Forms & Inputs */
.form-group label,
.payment-container label,
.withdrawal-container label,
.profile-info label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

input,
select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 1rem;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
  margin-bottom: 20px;
}

input:focus,
select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* =========================================
   LAYOUTS / CONTAINERS
   ========================================= */

/* Glass Containers (Auth, Payment, Withdrawal, Edit, Shop Header) */
.auth-container,
.payment-container,
.withdrawal-container,
.profile-card,
.header.shop-header {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  margin: 40px auto;
  position: relative;
  z-index: 1;
}

.auth-header,
.payment-container h2,
.withdrawal-container h2 {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 30px;
}

/* Top Home Header */
.header:not(.shop-header) {
  padding: 40px 20px 60px;
  color: var(--text-light);
  text-align: center;
}

.top-icons {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.icon {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: #fff;
}

.icon:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.profile img,
.avatar,
.text-avatar {
  border-radius: var(--radius-full);
  border: 3px solid var(--primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  object-fit: cover;
}

.profile img {
  width: 44px;
  height: 44px;
  display: block;
}

.avatar {
  width: 100px;
  height: 100px;
}

/* Dynamic Text Avatars */
.text-avatar {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  width: 44px;
  height: 44px;
  font-size: 20px;
}

.text-avatar.large {
  width: 100px;
  height: 100px;
  font-size: 48px;
}

.text-avatar.xlarge {
  width: 120px;
  height: 120px;
  font-size: 56px;
  margin: 0 auto 20px;
}

.user-name {
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  display: inline-block;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.balance {
  margin-top: 24px;
  font-size: clamp(32px, 6vw, 42px);
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.balance .currency {
  font-size: 16px;
  margin-right: 4px;
  opacity: 0.9;
}

.balance .decimal {
  font-size: 20px;
  opacity: 0.8;
}

.balance-label {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.7;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* =========================================
   GRID AND CARDS (Home, Menu, Shop, Loans)
   ========================================= */

.cards,
.menu-grid,
.loan-list,
.products {
  flex: 1;
  padding: 20px;
  margin: 0 auto;
  max-width: 1000px;
  width: 100%;
  display: grid;
  gap: 20px;
  position: relative;
  z-index: 1;
}

/* Pull up the home cards over the header */
.cards {
  margin-top: -30px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.menu-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.loan-list {
  grid-template-columns: 1fr;
}

.products {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card,
.menu-card,
.loan-card,
.product-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
}

.card:hover,
.menu-card:hover,
.loan-card:hover,
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.8);
}

/* Home Card Specifics */
.card {
  justify-content: space-between;
  align-items: center;
}

.card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.orange {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.green-bg {
  background: linear-gradient(135deg, #10b981, #059669);
}

.red-bg {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.blue-bg {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.purple {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.card-right {
  font-weight: 700;
  font-size: 1.1rem;
}

.text-green {
  color: var(--primary-dark);
}

.text-red {
  color: var(--danger);
}

/* Menu Card Specifics */
.menu-card {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 15px;
  text-align: center;
}

.menu-card .icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  font-size: 24px;
}

.menu-card p {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.pink i {
  color: #ec4899;
}

.green i {
  color: var(--primary);
}

.red i {
  color: var(--danger);
}

.blue i {
  color: var(--secondary);
}

.power i {
  color: var(--danger);
}

/* Loan Card Specifics */
.loan-card {
  justify-content: space-between;
  align-items: center;
  padding: 24px;
}

.loan-card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.loan-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.loan-card span {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 20px;
}

/* Shop Card Specifics */
.product-card {
  flex-direction: column;
}

.product-img {
  height: 160px;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  background-image: linear-gradient(45deg, #f1f5f9 25%, #e2e8f0 25%, #e2e8f0 50%, #f1f5f9 50%, #f1f5f9 75%, #e2e8f0 75%, #e2e8f0 100%);
  background-size: 20px 20px;
}

.product-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.product-card .price {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 1.25rem;
  margin-bottom: 16px;
}

/* Profile Page Specifics */
.profile-section {
  text-align: center;
  padding: 20px;
}

.profile-section h2 {
  color: var(--text-light);
  margin-top: 16px;
}

.status {
  color: var(--glass-bg);
  margin-top: 8px;
  font-weight: 500;
}

.balance-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.profile-card img {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 4px solid var(--primary);
  margin: 0 auto 20px;
  display: block;
}

/* Auth Specifics */
.auth-footer {
  text-align: center;
  margin-top: 20px;
}

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

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

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

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 100;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.bottom-nav .nav-item {
  text-decoration: none;
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition);
  flex: 1;
}

.bottom-nav .nav-item i {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
  transition: var(--transition);
}

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

.bottom-nav .nav-item.active i {
  transform: translateY(-4px);
  color: var(--primary);
  text-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
}

/* =========================================
   RESPONSIVE DESIGN (DESKTOP)
   ========================================= */

@media (min-width: 768px) {
  .app {
    padding-bottom: 0;
    padding-left: 100px;
    /* Space for the sidebar */
  }

  .bottom-nav {
    top: 0;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 100vh;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 60px;
    border-top: none;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    /* Remove top rounded corners from mobile */
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
  }

  .bottom-nav .nav-item {
    flex: none;
    width: 100%;
    padding: 24px 0;
    margin-bottom: 5px;
  }
}