/* PvPlayer Payment System - Material Design Styles */
/* Colors: Blue #185EE8, Red #CC1534, Black #000, White #FFF, Gray #F1F1F1 */

/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Roboto:wght@400;500;700&display=swap");

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

body {
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f1f1f1;
  color: #000000;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
}

/* Header */
.header {
  background-color: #ffffff;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header img {
  height: 32px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.header h1 {
  font-family: "Rajdhani", sans-serif;
  color: #151515;
  font-size: 1.25rem;
  font-weight: 700;
}

/* Main Container */
.container {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
}

/* Cards */
.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #000000;
}

/* Location Badge */
.location-badge {
  display: inline-block;
  background-color: #185ee8;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Product Selection */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-option {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-option:hover {
  border-color: #185ee8;
  background-color: #f8faff;
}

.product-option.selected {
  border-color: #185ee8;
  background-color: #eef4ff;
}

.product-option input[type="radio"] {
  display: none;
}

.product-radio {
  width: 22px;
  height: 22px;
  border: 2px solid #cccccc;
  border-radius: 50%;
  margin-right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-option.selected .product-radio {
  border-color: #185ee8;
}

.product-option.selected .product-radio::after {
  content: "";
  width: 12px;
  height: 12px;
  background-color: #185ee8;
  border-radius: 50%;
}

.product-info {
  flex: 1;
}

.product-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.product-duration {
  font-size: 0.85rem;
  color: #666666;
}

.product-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: #185ee8;
}

/* Quantity Selector */
.quantity-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.quantity-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.quantity-btn {
  width: 44px;
  height: 44px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  color: #185ee8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.quantity-btn:hover {
  border-color: #185ee8;
  background-color: #f8faff;
}

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

.quantity-value {
  font-size: 1.5rem;
  font-weight: 700;
  min-width: 50px;
  text-align: center;
}

.quantity-hint {
  text-align: center;
  font-size: 0.8rem;
  color: #888888;
  margin-top: 0.5rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: #185ee8;
}

.form-input::placeholder {
  color: #999999;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1rem;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #185ee8;
}

.checkbox-label {
  font-size: 0.85rem;
  color: #666666;
  line-height: 1.4;
}

/* Invoice Fields */
.invoice-fields {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.invoice-fields.visible {
  display: block;
}

/* Summary */
.summary {
  background: linear-gradient(135deg, #185ee8 0%, #1249c4 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.summary-row:last-child {
  margin-bottom: 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 700;
  font-size: 1.2rem;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #cc1534 0%, #a81129 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(204, 21, 52, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #a81129 0%, #8b0e22 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(204, 21, 52, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(204, 21, 52, 0.25);
}

.btn-primary:disabled {
  background: #cccccc;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #ffffff;
  color: #185ee8;
  border: 2px solid #185ee8;
}

.btn-secondary:hover {
  background: #f0f6ff;
}

/* Loading State */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  top: 50%;
  left: 50%;
  margin: -12px 0 0 -12px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Footer */
.footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: #666666;
}

.footer a {
  color: #185ee8;
  text-decoration: none;
}

/* Security Badge */
.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #666666;
}

.security-badge svg {
  width: 16px;
  height: 16px;
}

/* Error Message */
.error-message {
  background-color: #fee2e2;
  border: 1px solid #fecaca;
  color: #cc1534;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: none;
}

.error-message.visible {
  display: block;
}

/* Success Page */
.success-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  max-width: 400px;
  margin: 2rem auto;
}

.success-icon {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.success-icon svg {
  width: 48px;
  height: 48px;
  color: #ffffff;
}

.success-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #151515;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.success-message {
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #666666;
  margin-bottom: 2rem;
}

.success-details {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  text-align: left;
}

.success-details-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.95rem;
}

.success-details-row:not(:last-child) {
  border-bottom: 1px solid #e2e8f0;
}

.success-details-label {
  color: #64748b;
}

.success-details-value {
  font-weight: 600;
  color: #151515;
}

/* Error Page */
.error-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  max-width: 400px;
  margin: 2rem auto;
}

.error-icon {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, #cc1534 0%, #a81129 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  box-shadow: 0 8px 24px rgba(204, 21, 52, 0.3);
}

.error-icon svg {
  width: 48px;
  height: 48px;
  color: #ffffff;
}

.error-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #151515;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.error-message {
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #666666;
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 380px) {
  .container {
    padding: 1rem;
  }

  .product-option {
    padding: 0.875rem;
  }

  .product-name {
    font-size: 0.95rem;
  }

  .product-price {
    font-size: 1rem;
  }
}
