:root {
  /* Colors - Inspired by PayPay branding but modernized */
  --pay-red: #ff0033;
  --pay-blue: #00aaff;
  --pay-bg: #f5f7fa;
  --pay-card-bg: #ffffff;
  --pay-text-main: #1a1a1a;
  --pay-text-muted: #888888;
  --pay-border: #eeeeee;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--pay-bg);
  color: var(--pay-text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* App Container (Phone-like width for this specific wireframe but responsive) */
.app-viewport {
  width: 100%;
  max-width: 480px; /* Standard mobile/app focus */
  background: var(--pay-bg);
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(0,0,0,0.1);
}

/* Layout Utilities */
.container {
  padding: 0 var(--space-md);
}

/* Header */
.header {
  padding: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--pay-bg);
  z-index: 100;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--pay-red);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 20px;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.header-actions {
  display: flex;
  gap: var(--space-md);
}

.notification-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  background: var(--pay-red);
  border: 2px solid white;
  border-radius: 50%;
}

/* Payment Card Area */
.payment-section {
  margin-top: var(--space-sm);
}

.payment-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.barcode-area {
  margin-bottom: var(--space-lg);
  text-align: center;
}

.barcode-placeholder {
  height: 60px;
  background: repeating-linear-gradient(
    90deg,
    #000,
    #000 2px,
    #fff 2px,
    #fff 4px
  );
  width: 100%;
  border-radius: 4px;
}

.qr-row {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.qr-placeholder {
  width: 80px;
  height: 80px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 4px;
}

.qr-dot {
  background: #333;
  margin: 1px;
}

.payment-method-info {
  flex: 1;
}

.method-label {
  font-size: 12px;
  color: var(--pay-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.method-type {
  color: var(--pay-blue);
  font-weight: 700;
  font-size: 16px;
  margin: 4px 0;
}

.card-details {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--pay-blue);
  margin: var(--space-md) var(--space-md);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-sm);
  color: white;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.action-item:hover {
  opacity: 0.8;
}

.icon-box {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Menu Grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  background: white;
  margin: 0 var(--space-md);
  padding: var(--space-lg) var(--space-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-sm);
}

.menu-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f8faff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pay-blue);
}

.menu-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--pay-text-main);
  white-space: nowrap;
}

/* Finance Stats */
.finance-stats {
  margin: var(--space-md);
  background: white;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--pay-border);
}

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

.stat-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.stat-label {
  font-weight: 600;
  font-size: 14px;
}

.stat-value-group {
  text-align: right;
}

.stat-value {
  font-weight: 700;
  font-size: 16px;
}

.stat-unit {
  font-size: 12px;
  color: var(--pay-text-muted);
  margin-left: 2px;
}

.stat-badge {
  background: #e6f9f1;
  color: #00cc88;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

/* Floating Navigation */
.bottom-nav {
  position: sticky;
  bottom: 0;
  width: 100%;
  background: white;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: var(--space-sm) 0 calc(var(--space-sm) + 10px);
  border-top: 1px solid var(--pay-border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--pay-text-muted);
  text-decoration: none;
}

.nav-item.active {
  color: var(--pay-red);
}

.nav-pay-btn {
  position: relative;
  top: -20px;
}

.pay-circle {
  width: 60px;
  height: 60px;
  background: var(--pay-blue);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(0,170,255,0.4);
}

.pay-circle span {
  font-size: 10px;
  font-weight: 800;
  margin-top: 2px;
}

/* Placeholders */
.placeholder-icon {
  width: 20px;
  height: 20px;
  background: currentColor;
  opacity: 0.2;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3C/svg%3E") no-repeat center;
}

/* Animations */
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.animate-in {
  animation: slideUp 0.4s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
