/* Hot Shots Purchase Page — Mobile-first
   Color palette from landing page:
   Primary: #ffbc00 (yellow/gold)
   Primary dark: #cc9600
   Secondary: #000000 (black)
   Accent: #0a92dd (blue)
   Text on dark: #e0e0e0
*/

:root {
    --color-primary: #ffbc00;
    --color-primary-dark: #cc9600;
    --color-secondary: #000000;
    --color-accent: #0a92dd;
    --color-bg: #062a45;
    --color-card: #0a3a5c;
    --color-card-border: #0e4a72;
    --color-text: #e0e0e0;
    --color-text-muted: #888;
    --color-text-dim: #666;
    --color-success: #27ae60;
    --color-error: #e74c3c;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 420px;
    width: 100%;
}

/* Header */

header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    width: 100px;
    height: auto;
    margin-bottom: 12px;
}

.subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
}

/* Sections */

section {
    margin-bottom: 24px;
}

h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ccc;
}

/* Package Cards */

.packages {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.package-card {
    background: var(--color-card);
    border: 2px solid var(--color-card-border);
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.package-card:hover {
    border-color: var(--color-primary);
}

.package-card:active {
    transform: scale(0.98);
}

.package-card.selected {
    border-color: var(--color-primary);
    background: #0c4468;
}

.package-info {
    display: flex;
    flex-direction: column;
}

.package-name {
    font-weight: 600;
    font-size: 1rem;
}

.package-credits {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.package-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.package-badge {
    background: var(--color-primary);
    color: var(--color-secondary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
    white-space: nowrap;
}

.package-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Form Fields */

.field {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: #bbb;
}

input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    background: var(--color-card);
    border: 2px solid var(--color-card-border);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s;
}

input[type="email"]:focus {
    border-color: var(--color-primary);
}

input[type="email"]::placeholder {
    color: var(--color-text-dim);
}

.field-hint {
    font-size: 0.75rem;
    color: var(--color-text-dim);
    margin-top: 4px;
    display: block;
}

/* Stripe Card Element */

#card-element {
    background: var(--color-card);
    border: 2px solid var(--color-card-border);
    border-radius: 8px;
    padding: 12px 14px;
    transition: border-color 0.15s;
}

#card-element.StripeElement--focus {
    border-color: var(--color-primary);
}

#card-element.StripeElement--invalid {
    border-color: var(--color-error);
}

.error-text {
    color: var(--color-error);
    font-size: 0.8rem;
    margin-top: 6px;
    min-height: 20px;
}

/* Buttons */

button {
    width: 100%;
    padding: 14px;
    background: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover {
    background: var(--color-primary-dark);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:disabled:hover {
    background: var(--color-primary);
}

.terms {
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-text-dim);
    margin-top: 16px;
}

/* Spinner */

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid var(--color-secondary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Success Screen */

.success-icon {
    width: 60px;
    height: 60px;
    background: var(--color-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 16px;
}

#success-screen h2 {
    text-align: center;
    color: var(--color-success);
    margin-bottom: 24px;
}

#qr-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

#qr-image {
    max-width: 220px;
    width: 100%;
    height: auto;
    image-rendering: pixelated;
}

.credits-info {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
}

.instruction {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
    margin-bottom: 16px;
}

.email-info {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

#save-btn {
    background: var(--color-card-border);
    color: var(--color-text);
    margin-bottom: 20px;
}

#save-btn:hover {
    background: #115a8a;
}

/* Error Screen */

.error-icon {
    width: 60px;
    height: 60px;
    background: var(--color-error);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 16px;
}

#error-screen h2 {
    text-align: center;
    color: var(--color-error);
    margin-bottom: 12px;
}

#error-message {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

#retry-btn {
    background: var(--color-card-border);
    color: var(--color-text);
}

/* Utility */

.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 20px;
    color: var(--color-text-dim);
}

/* Desktop */

@media (min-width: 480px) {
    body {
        padding: 40px 20px;
    }
}
