@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&family=Open+Sans:wght@300;400;600;700&display=swap');

:root {
    --navy: #1D2285;
    --pink: #FB2D85;
    --pink-dark: #D91E6D;
    --lavender: #C7C5F7;
    --light-gray: #EEEEEE;
    --white: #FFFFFF;
    --text-dark: #2C2C2C;
    --text-light: #666666;
    --border: #E0E0E0;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(to bottom, #F8F7FE 0%, var(--lavender) 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.steps-indicator {
    text-align: center;
    margin-bottom: 20px;
}

.steps-indicator.bottom {
    margin-top: 40px;
    margin-bottom: 0;
}

.step {
    font-size: 14px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero {
    text-align: center;
    margin-bottom: 60px;
}

.main-title {
    font-family: 'Lora', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.2;
}

.main-title .italic {
    font-style: italic;
    color: var(--pink);
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    font-weight: 400;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 60px;
    margin-bottom: 40px;
}

.section-title {
    font-family: 'Lora', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 15px;
}

.section-description {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.7;
}

.receipt-form {
    background: white;
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--pink);
}

.file-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
}

.submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #D01268 0%, #A0104C 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 45, 133, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.access-bonus-btn {
    width: 100%;
    padding: 18px 32px;
    margin-top: 30px;
    background: linear-gradient(135deg, var(--navy) 0%, #151a6b 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(29, 34, 133, 0.3);
}

.access-bonus-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(29, 34, 133, 0.4);
}

.tiers-section {
    position: sticky;
    top: 20px;
}

.tiers-title {
    font-family: 'Lora', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 20px;
    text-align: center;
}

.tier-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 3px solid var(--border);
    transition: all 0.3s;
    position: relative;
}

.tier-card:hover {
    border-color: var(--pink);
    box-shadow: 0 4px 15px rgba(251, 45, 133, 0.2);
}

.tier-card.tier-active {
    border-color: var(--pink);
    background: linear-gradient(135deg, #F8F7FE 0%, var(--lavender) 100%);
    box-shadow: 0 6px 25px rgba(251, 45, 133, 0.3);
}

.tier-card.tier-active::before {
    content: '✓ UNLOCKED';
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--pink);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.tier-header {
    text-align: center;
    margin-bottom: 15px;
}

.tier-name {
    font-family: 'Lora', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 5px;
}

.tier-name .italic {
    font-style: italic;
}

.tier-range {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 600;
}

.tier-value {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pink);
    margin: 15px 0;
}

.tier-description {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.hidden {
    display: none;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

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

.loading-text {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.loading-subtext {
    font-size: 1rem;
    opacity: 0.9;
}

.result-section,
.manual-override,
.error-section {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--pink);
    box-shadow: 0 4px 20px rgba(251, 45, 133, 0.15);
}

.result-section.hidden,
.manual-override.hidden,
.error-section.hidden {
    display: none;
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-title {
    font-family: 'Lora', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
}

.result-description {
    font-size: 1.1rem;
    color: var(--text-light);
}

.order-summary {
    background: var(--lavender);
    padding: 20px;
    border-radius: 5px;
}

.order-summary h3 {
    font-family: 'Lora', serif;
    font-size: 1.3rem;
    color: var(--navy);
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

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

.detail-label {
    font-weight: 600;
    color: var(--text-dark);
}

.detail-value {
    color: var(--text-light);
}

.warning-box,
.error-box {
    background: #F8F7FE;
    border-left: 4px solid var(--pink-dark);
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 5px;
}

.failure-reasons {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.failure-reasons.hidden {
    display: none;
}

.failure-reasons h4 {
    font-family: 'Lora', serif;
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 10px;
}

.failure-reasons ul {
    margin: 0;
    padding-left: 25px;
}

.failure-reasons li {
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.5;
}

.confidence-notes {
    margin-top: 15px;
    padding: 12px;
    background: rgba(199, 197, 247, 0.3);
    border-radius: 5px;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-style: italic;
}

.confidence-notes.hidden {
    display: none;
}

.warning-box h3,
.error-box h3 {
    font-family: 'Lora', serif;
    color: var(--navy);
    margin-bottom: 10px;
}

.warning-box p,
.error-box p {
    color: var(--text-light);
}

.email-instructions-section {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--pink);
    box-shadow: 0 4px 20px rgba(251, 45, 133, 0.15);
}

.email-instructions-section.hidden {
    display: none;
}

.email-instructions-box {
    text-align: center;
}

.email-instructions-box h3 {
    font-family: 'Lora', serif;
    font-size: 1.8rem;
    color: var(--navy);
    margin-bottom: 15px;
}

.email-instructions-message {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 25px;
}

.email-contact {
    background: var(--lavender);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.email-contact p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.email-link {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--pink-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.email-link:hover {
    color: var(--navy);
    text-decoration: underline;
}

.manual-form {
    background: #f8f8fc;
    padding: 25px;
    border-radius: 10px;
    border: 2px solid var(--lavender);
}

.manual-form label {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--navy);
    margin-bottom: 15px;
}

.manual-form-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.manual-form input {
    width: 100px;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 5px;
    font-size: 1.1rem;
    text-align: center;
    font-weight: 600;
}

.manual-form input:focus {
    outline: none;
    border-color: var(--pink);
}

.manual-form button {
    flex: 1;
    padding: 14px 30px;
    font-size: 1.05rem;
}

@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .tiers-section {
        position: static;
    }
    
    .main-title {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
    .main-title {
        font-size: 1.8rem;
    }
    
    .receipt-form {
        padding: 25px;
    }
    
    .manual-form-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .manual-form input {
        width: 100%;
        text-align: left;
    }
    
    .manual-form button {
        width: 100%;
    }
}

#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.congrats-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.congrats-overlay.show {
    opacity: 1;
}

.congrats-overlay.hidden {
    display: none;
}

.congrats-content {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(29, 34, 133, 0.3);
    border: 3px solid var(--pink);
    transform: scale(0.8);
    animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.congrats-title {
    font-family: 'Lora', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 20px;
    line-height: 1.2;
}

.congrats-subtitle {
    font-family: 'Lora', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--pink);
    margin: 0;
}

@media (max-width: 600px) {
    .congrats-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .congrats-title {
        font-size: 2rem;
    }
    
    .congrats-subtitle {
        font-size: 1.3rem;
    }
}
