﻿/* style.css - IMO Recharge Light Blue Theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Modern Light Glass Theme Variables */
  --bg-gradient: linear-gradient(135deg, #f0f8ff 0%, #e0f2fe 100%);
  --surface-color: rgba(255, 255, 255, 0.7);
  --surface-border: rgba(255, 255, 255, 0.4);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --primary-color: #2563eb;
  --primary-light: #60a5fa;
  --primary-lighter: #93c5fd;
  --accent-color: #8b5cf6;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px rgba(59, 130, 246, 0.1);
  --shadow-modal: 0 25px 50px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Animated Background Elements */
.bg-shape {
    position: fixed;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
    z-index: -1;
}
.shape-1 {
    width: 400px; height: 400px;
    background: #bfdbfe; /* Soft light blue */
    top: -100px; left: -100px;
    border-radius: 50%;
}
.shape-2 {
    width: 500px; height: 500px;
    background: #e9d5ff; /* Soft light purple */
    bottom: -150px; right: -100px;
    border-radius: 50%;
    animation-delay: -5s;
}
@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

h1, h2, h3, h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

/* Base App Layout */
.app-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  background: transparent;
  min-height: 100vh;
  position: relative;
  padding-bottom: 2rem;
}

@media (max-width: 768px) {
  .app-container {
    max-width: 100%;
  }
}

/* IMO Header */
.imo-header {
  background: var(--surface-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--primary-color);
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--surface-border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  border-radius: 0 0 16px 16px;
  margin-bottom: 1rem;
}

.imo-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

.header-refresh {
  position: absolute;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.5);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.header-refresh:hover {
  background: var(--primary-light);
  color: white;
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--surface-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--surface-border);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    padding-bottom: env(safe-area-inset-bottom, 0.75rem);
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 4px;
    transition: all 0.2s ease;
}
.nav-item i {
    font-size: 1.2rem;
}
.nav-item.active, .nav-item:hover {
    color: var(--primary-color);
}
body {
    padding-bottom: 70px;
}

/* Sections */
.section {
  padding: 1rem;
}

/* Cards & Inputs */
.imo-card {
  background: var(--surface-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.5);
  border: 1px solid var(--surface-border);
  margin-bottom: 1rem;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.imo-input {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
}

.imo-input:focus {
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-help-btn {
  position: absolute;
  right: 1rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
}

.helper-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  margin-left: 0.5rem;
}

/* Credit Grid */
.credit-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.credit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .credit-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .credit-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
  }
}

.credit-item {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 1rem 0.5rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.credit-item.selected {
  border: 2px solid var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
}

.credit-item .diamond-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.credit-item .price-val {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.selected-badge {
  position: absolute;
  top: -10px;
  left: 5px;
  background: var(--primary-color);
  color: white;
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 10px;
  display: none;
}

.check-icon {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--primary-color);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.7rem;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.credit-item.selected .selected-badge,
.credit-item.selected .check-icon {
  display: flex;
}

/* Coupon Select */
.coupon-select {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  font-size: 0.9rem;
  color: var(--text-primary);
  appearance: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/200.svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 1rem center;
  background-color: transparent;
}

/* Action Bar */
.action-bar {
  background: var(--surface-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--surface-border);
  margin: 1rem;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.05);
}

.qty-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--primary-light);
  background: #f0f8ff;
  color: var(--primary-light);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.qty-input {
  width: 40px;
  text-align: center;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
}

.total-display {
  text-align: right;
}

.total-diamonds {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.total-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-proceed {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--primary-color), #2563eb);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.btn-proceed:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

/* Support & History Sections */
.section-header {
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.support-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: var(--surface-color);
  margin-bottom: 0.5rem;
  border: 1px solid var(--surface-border);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.support-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.support-icon.imo { background: #e3f2fd; color: #00569e; }
.support-icon.wa { background: #dcf8c6; color: #25d366; }

.support-text .title { font-size: 0.9rem; color: var(--text-secondary); }
.support-text .value { font-size: 1rem; font-weight: 600; color: var(--text-primary); }

.search-btn {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--primary-light);
  background: transparent;
  color: var(--primary-light);
  font-weight: 600;
  margin-top: 0.5rem;
  cursor: pointer;
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--surface-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid var(--surface-border);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal), inset 0 1px 0 rgba(255,255,255,0.5);
  position: relative;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.1rem;
  border: 1px solid var(--primary-light);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  background: #f0f8ff;
}

.close-modal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.order-summary {
  background: #f8fbff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.summary-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.summary-item .label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.summary-item .value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn-pay-upi {
  flex: 1;
  background: linear-gradient(90deg, #60b3e6, #3b88c3);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.btn-show-qr {
  background: white;
  border: 1px solid var(--surface-border);
  color: var(--primary-color);
  border-radius: 12px;
  padding: 1rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  min-width: 80px;
}

.modal-footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.timer-text {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Forms for modals */
.form-group {
  margin-bottom: 1rem;
  text-align: left;
}
.form-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--surface-border);
  font-size: 1rem;
}

/* Admin Tables */
.admin-table-container {
  width: 100%;
  overflow-x: auto;
  background: var(--surface-color);
  border-radius: 16px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.5);
  border: 1px solid var(--surface-border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: rgba(255, 255, 255, 0.5);
  padding: 1rem;
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--surface-border);
}

.admin-table td {
  padding: 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--surface-border);
  vertical-align: middle;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-success { background: #dcf8c6; color: #166534; }
.badge-warning { background: #fef08a; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

.btn-sm {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: white;
}
.btn-success { background: #22c55e; }
.btn-danger { background: #ef4444; }
.btn-secondary { background: #64748b; }


/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
  display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
* {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.imo-diamond {
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.2em;
  display: inline-block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

