/* =============================================
   Creator Pricing Calculator - Marvellous Club
   ============================================= */

/* CSS Variables - Marvellous Brand */
:root {
    /* Brand Colors */
    --primary: #BA3B46;
    --primary-hover: #a83340;
    --primary-light: rgba(186, 59, 70, 0.15);

    /* Neutrals */
    --white: #ffffff;
    --cream: #f8f9fa;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Pastels */
    --pastel-pink: #FFE5E8;
    --pastel-cream: #FFF8E8;

    /* Platform Colors */
    --instagram: #E4405F;
    --tiktok: #000000;
    --youtube: #FF0000;

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --container-max: 480px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: transparent;
    /* Transparent for embed */
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.5;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 1rem;
    /* Reduced padding */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center vertically */
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
    display: none;
    /* Hidden for embed mode */
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-text {
    color: var(--gray-900);
}

.logo-accent {
    color: var(--primary);
}

.tagline {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    /* Softer shadow */
    padding: 1.5rem;
    /* Reduced padding */
    width: 100%;
    /* flex: 1; Removed to allow compact height */
    max-width: 420px;
    /* Slightly constrained */
    margin: 0 auto;
    background: #ffffff;
    /* Solid white for the 'cell' */
}

.calculator-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    /* min-height: 400px; Removed to allow compact height */
}

/* Steps */
.step {
    animation: fadeIn 0.3s ease;
}

.step.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
    text-align: center;
}

/* Platform Grid */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.platform-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 0.75rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.platform-btn:hover {
    border-color: var(--gray-300);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.platform-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.platform-btn.active .platform-icon {
    color: var(--primary);
}

.platform-btn.active .platform-name {
    color: var(--primary);
    font-weight: 600;
}

.platform-icon {
    width: 32px;
    height: 32px;
    color: var(--gray-600);
    transition: color 0.2s ease;
}

.platform-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.2s ease;
}

/* Username Input */
.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input-prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    background: var(--gray-100);
    border-right: 1px solid var(--gray-200);
    height: 52px;
}

.input-icon {
    width: 20px;
    height: 20px;
    color: var(--gray-500);
}

.username-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: var(--font-sans);
    background: transparent;
    color: var(--gray-800);
}

.username-input::placeholder {
    color: var(--gray-400);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: center;
    margin-top: 0.5rem;
}

.input-error {
    font-size: 0.75rem;
    color: var(--primary);
    text-align: center;
    margin-top: 0.25rem;
    min-height: 1rem;
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--gray-900);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.calculate-btn:hover:not(:disabled) {
    background: var(--gray-800);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calculate-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.calculate-btn.loading .btn-text {
    display: none;
}

.calculate-btn.loading .btn-loader {
    display: block;
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Loading State */
.loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

.loading-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.loading-subtext {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Profile Section */
.profile-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.profile-section.hidden {
    display: none;
}

.profile-pic {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.profile-pic.hidden {
    display: none;
}

.profile-info {
    text-align: left;
}

.profile-name {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.profile-handle {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.ugc-badge {
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    background-color: var(--primary-50);
    color: var(--primary-600);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Results */
.results-content {
    text-align: center;
    padding: 1rem 0;
}

.results-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.rate-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.rate-currency {
    font-size: 2rem;
    font-weight: 600;
    color: var(--gray-600);
}

.rate-amount {
    font-size: 4rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.rate-suffix {
    font-size: 1rem;
    color: var(--gray-500);
    margin-left: 0.25rem;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat {
    background: var(--gray-100);
    padding: 1rem;
    border-radius: var(--radius-md);
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.results-note {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-bottom: 2rem;
}

/* CTA Section */
.cta-section {
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.cta-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.waitlist-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.waitlist-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(186, 59, 70, 0.3);
}

.arrow-icon {
    width: 18px;
    height: 18px;
}

/* Rates Grid with Blur Reveal */
.results-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.rates-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.rates-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: filter 0.5s ease;
}

.rates-grid.blurred {
    filter: blur(12px);
    user-select: none;
    pointer-events: none;
}

.rate-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.rate-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.rate-card-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-700);
}

.rate-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Blur Overlay */
.blur-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(2px);
    border-radius: var(--radius-md);
    transition: opacity 0.4s ease;
    z-index: 10;
}

.blur-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.reveal-prompt {
    text-align: center;
}

.reveal-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.reveal-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(186, 59, 70, 0.3);
}

.reveal-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(186, 59, 70, 0.4);
}

.eye-icon {
    width: 20px;
    height: 20px;
}

/* Reveal Animation */
@keyframes revealPop {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.rate-card.revealed {
    animation: revealPop 0.4s ease forwards;
}

.rate-card:nth-child(1).revealed {
    animation-delay: 0s;
}

.rate-card:nth-child(2).revealed {
    animation-delay: 0.1s;
}

.rate-card:nth-child(3).revealed {
    animation-delay: 0.2s;
}

/* Error State */
.error-content {
    text-align: center;
    padding: 2rem 1rem;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.error-message {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.retry-btn {
    padding: 0.75rem 1.5rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    background: var(--gray-200);
}

/* Footer */
/* Embedded Footer */
.footer-embed {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

.footer-embed p {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Old Footer removal */
.footer {
    display: none;
}

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

    .glass-card {
        padding: 1.5rem;
    }

    .rate-amount {
        font-size: 3rem;
    }

    .platform-btn {
        padding: 1rem 0.5rem;
    }

    .platform-icon {
        width: 28px;
        height: 28px;
    }

    .platform-name {
        font-size: 0.75rem;
    }
}