/* ============================================
   FastRounds Main Stylesheet
   Light Theme: Teal / Purple / Gold
   Mobile-First Design
   ============================================ */

:root {
    /* Light theme backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f6f8;
    --bg-card: #ffffff;
    --bg-input: #ffffff;

    /* Brand colors (unified with Yellow Moon palette) */
    --teal: #00b4d8;
    --teal-dark: #0096b7;
    --teal-light: #48cae4;

    --purple: #7b2cbf;
    --purple-dark: #5a189a;
    --purple-light: #9d4edd;

    --gold: #e6a800;
    --gold-dark: #c48f00;
    --gold-light: #ffc93c;

    /* Status colors */
    --success: #28a745;
    --success-light: #34d058;
    --error: #dc3545;
    --error-dark: #b02a37;
    --warning: #ffa500;

    /* Text colors on light theme */
    --text-primary: #1a1a2e;
    --text-secondary: #5a5f72;
    --text-muted: #8a8f9f;

    /* Borders */
    --border-color: rgba(26, 26, 46, 0.08);
    --border-light: rgba(26, 26, 46, 0.12);
    --border-accent: rgba(0, 180, 216, 0.25);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--teal), var(--purple));
    --gradient-gold: linear-gradient(135deg, var(--gold), var(--purple));

    /* Shadows on light theme */
    --shadow-sm: 0 2px 4px rgba(26, 26, 46, 0.06);
    --shadow-md: 0 4px 12px rgba(26, 26, 46, 0.08);
    --shadow-lg: 0 8px 24px rgba(26, 26, 46, 0.12);
    --shadow-glow-teal: 0 0 20px rgba(0, 180, 216, 0.25);
    --shadow-glow-gold: 0 0 20px rgba(230, 168, 0, 0.3);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* ============================================
   RESET AND BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

input, select, textarea {
    font-size: 16px !important;
}

a {
    color: var(--teal);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--teal-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: var(--spacing-md);
}

.text-teal { color: var(--teal); }
.text-purple { color: var(--purple); }
.text-gold { color: var(--gold); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }

/* ============================================
   LAYOUT HELPERS
   ============================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    min-height: 48px;
    min-width: 48px;
    font-family: var(--font-family);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: var(--shadow-glow-teal);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.form-input {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-family);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

.form-input-code {
    text-align: center;
    font-size: 1.5rem !important;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
    margin-bottom: 0;
    text-align: center;
}

.form-input-error {
    border-color: var(--error);
}

/* Honeypot field for bots */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.25);
    color: var(--error-dark);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.08);
    border: 1px solid rgba(40, 167, 69, 0.25);
    color: #1e7e34;
}

/* ============================================
   SPINNER
   ============================================ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

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

/* ============================================
   ANIMATIONS
   ============================================ */
.shake {
    animation: shake 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
}

/* ============================================
   LEGACY LOGO (for non-homepage pages)
   Used by try-free.php, buy-now.php, terms.php,
   privacy.php, refund.php, learn-more.php, etc.
   ============================================ */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.main-logo {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .main-logo {
        max-width: 250px;
        margin-top: 10px;
        margin-bottom: 10px;
    }
}

@media (min-width: 769px) {
    .main-logo {
        max-width: 300px;
        margin-top: 20px;
        margin-bottom: 30px;
    }
}

/* ============================================
   SHARED SITE NAV (light theme)
   ============================================ */
.site-nav {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 200;
}

.site-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
}

.site-nav-logo img {
    height: 72px;
    width: auto;
}

.site-nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    list-style: none;
}

.site-nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    text-decoration: none;
}

.site-nav-links a:hover {
    color: var(--teal);
}

.site-nav-links a.active {
    color: var(--teal);
    font-weight: 700;
}

.site-nav-enter {
    color: var(--teal);
    padding: 7px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--teal);
    font-weight: 600;
    transition: background var(--transition-fast);
}

.site-nav-enter:hover {
    background: rgba(0, 180, 216, 0.08);
}

.site-nav-cta {
    background: var(--gradient-primary);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.site-nav-cta:hover {
    box-shadow: var(--shadow-glow-teal);
    transform: translateY(-1px);
    color: #ffffff;
}

.site-nav-links .site-nav-cta,
.site-nav-links .site-nav-cta:hover {
    color: #ffffff;
}

/* Hamburger */
.site-nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.site-nav-hamburger:hover {
    background: var(--border-color);
}

.site-nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.site-nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav-hamburger.open span:nth-child(2) { opacity: 0; }
.site-nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.site-nav-drawer {
    display: none;
    flex-direction: column;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-md) 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 199;
    box-shadow: var(--shadow-lg);
}

.site-nav-drawer.open {
    display: flex;
}

.site-nav-drawer a {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    padding: var(--spacing-md) var(--spacing-lg);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.site-nav-drawer a:last-child {
    border-bottom: none;
}

.site-nav-drawer a:hover {
    color: var(--teal);
    background: rgba(0, 180, 216, 0.04);
}

.site-nav-drawer a.active {
    color: var(--teal);
    font-weight: 700;
    background: rgba(0, 180, 216, 0.06);
}

.site-nav-drawer-host {
    color: var(--purple);
    font-weight: 700;
}

@media (max-width: 768px) {
    .site-nav-inner { height: 72px; padding: 0 var(--spacing-md); }
    .site-nav-logo img { height: 64px; }
    .site-nav-links { display: none !important; }
    .site-nav-hamburger { display: flex; }
}

@media (min-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
}

/* ============================================
   SHARED FOOTER (site-wide, used via footer.php)
   ============================================ */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm) var(--spacing-lg);
    padding: var(--spacing-lg);
    color: var(--text-muted);
    font-size: 0.875rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-links a {
    white-space: nowrap;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--teal);
}

.footer-yellowmoon {
    width: 100%;
    text-align: center;
    background: var(--bg-secondary);
    padding-top: var(--spacing-md);
}

.footer-yellowmoon p {
    margin: 0;
    font-size: 0.85em;
    color: var(--text-muted);
}

.footer-yellowmoon a {
    color: var(--text-muted);
    text-decoration: none;
}

/* ============================================
   SHARED CONTACT TOAST (right-anchored)
   ============================================ */
.contact-toast-wrapper {
    position: relative;
    display: inline-block;
}

.contact-toast {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    transform: translateY(8px);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-md);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), transform var(--transition-normal), visibility var(--transition-normal);
    z-index: 100;
}

.contact-toast.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.contact-toast::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 20px;
    border: 8px solid transparent;
    border-top-color: var(--border-light);
}

.contact-toast::before {
    content: '';
    position: absolute;
    top: 100%;
    right: 21px;
    border: 7px solid transparent;
    border-top-color: var(--bg-card);
    z-index: 1;
}

.contact-toast-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    width: 100%;
    padding: var(--spacing-md);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-family: var(--font-family);
    white-space: nowrap;
}

.contact-toast-btn:hover {
    background: var(--bg-secondary);
}

.contact-toast-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: var(--teal);
}

.contact-toast-divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-xs) 0;
}

.contact-toast-btn.copied {
    color: var(--success);
    pointer-events: none;
}
