* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

:root {
    --primary-gradient: linear-gradient(90deg, #FF416C 0%, #FF4B2B 100%);
    --button-shadow: 0 6px 20px rgba(255, 65, 108, 0.3);
    --button-hover-shadow: 0 10px 25px rgba(255, 65, 108, 0.5);
    --ten-bucks-color: #0F4C25; /* Darker forest green */
    --ten-bucks-hover: #166e36; /* Slightly lighter forest green for hover */
    --ten-bucks-shadow: 0 6px 20px rgba(15, 76, 37, 0.3); /* Shadow matching new green */
    --ten-bucks-hover-shadow: 0 10px 25px rgba(15, 76, 37, 0.5); /* Hover shadow matching new green */
}

html, body {
    background-color: #000000;
    color: #ffffff;
    min-height: 100%;
    height: 100%;
    width: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1rem;
    background-color: #000000;
    align-items: center;
    position: relative; /* To allow absolute positioning of children */
}

.tagline-container {
    width: 100%;
    text-align: center;
    padding-top: 2rem;
    margin-bottom: 3rem;
    min-height: 4rem;
}

.tagline {
    display: inline-block;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 500;
    max-width: 90%;
    color: #f5f5f5;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 5s ease;
    min-height: 2rem;
}

.tagline.visible {
    opacity: 1;
}

.button-container {
    /* Fixed height prevents "jumping" */
    height: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem;
}

#payButton {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 1rem 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--button-shadow);
    text-transform: uppercase;
    width: 100%;
    max-width: 20rem;
    white-space: nowrap; /* Prevent text wrapping */
    
    /* Added for perfect text centering */
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

#payButton:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: var(--button-hover-shadow);
}

#payButton:active {
    transform: translateY(2px);
}

/* Ten Bucks Button Styles */
.ten-bucks-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem; /* Default spacing */
    padding: 0 1rem; /* Add padding to container to allow button to expand */
}

/* When payment box is shown, position the ten bucks button centered in remaining space */
.payment-modal.active ~ .ten-bucks-container {
    position: absolute;
    top: 50%; /* Position in middle of remaining space */
    transform: translateY(150px); /* Offset to account for content above */
    margin-top: 0; /* Remove default margin */
    width: 95%; /* Slightly narrower than full width to avoid edge issues */
    max-width: 100vw; /* Prevent overflow */
}

.ten-bucks-button {
    background-color: var(--ten-bucks-color);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 0.8rem 1.5rem; /* Slightly more vertical padding */
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--ten-bucks-shadow);
    text-align: center;
    white-space: nowrap; /* Keep text on a single line */
    overflow: hidden; /* Hide any overflow */
    text-overflow: ellipsis; /* Show ellipsis if text overflows */
    opacity: 0;
    display: none;
    transition: opacity 1.5s ease; /* Match the PayPal box transition */
    /* Remove fixed width constraints to allow natural sizing */
    width: auto;
    min-width: max-content; /* Ensure it's at least as wide as its content */
    
    /* Added for text centering consistency */
    display: flex;
    justify-content: center;
    align-items: center;
}

.ten-bucks-button.active {
    display: flex; /* Changed from inline-block to flex for consistent centering */
}

.ten-bucks-button.visible {
    opacity: 1;
}

.ten-bucks-button:hover {
    background-color: var(--ten-bucks-hover);
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--ten-bucks-hover-shadow);
}

.ten-bucks-button:active {
    transform: translateY(2px);
}

/* For smaller screens, adjust button properties */
@media (max-width: 480px) {
    .ten-bucks-container {
        padding: 0 0.7rem; /* Less padding on small screens */
    }
    
    .ten-bucks-button {
        font-size: 0.8rem; /* Smaller font on small screens */
        padding: 0.7rem 1.2rem;
        max-width: 100%; /* Allow full width */
    }
}

/* For smaller screens, revert to static positioning */
@media (max-height: 700px) {
    .payment-modal.active ~ .ten-bucks-container {
        position: relative;
        top: auto;
        transform: none;
        margin-top: 2rem;
    }
}

/* Payment Modal with Fade Animation */
.payment-modal {
    display: none; /* Hidden by default */
    opacity: 0;
    transition: opacity 1.5s ease;
    width: 100%;
    max-width: 20rem;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    background-color: #222;
    padding: 1.5rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.payment-modal.active {
    display: block; /* Show the container */
}

.payment-modal.visible {
    opacity: 1; /* Fade in */
}

/* PayPal button adjustments for mobile */
@media (max-width: 480px) {
    .pp-XGLDDXCT6CCY4 {
        font-size: 0.9rem !important;
        min-width: 10rem !important;
    }
}

/* Extra small screen adjustment */
@media (max-width: 360px) {
    .pp-XGLDDXCT6CCY4 {
        font-size: 0.8rem !important;
        padding: 0 1.5rem !important;
    }
    
    .ten-bucks-button {
        font-size: 0.7rem;
        padding: 0.6rem 1rem;
    }
}

/* Mobile responsive adjustments */
@media (min-width: 768px) {
    .page-container {
        padding: 2rem;
    }
    
    .tagline {
        font-size: 1.5rem;
        max-width: 80%;
    }
    
    #payButton {
        padding: 1.125rem 2.5rem;
        font-size: 1.375rem;
    }
    
    .ten-bucks-button {
        padding: 0.8rem 1.8rem;
        font-size: 1.1rem;
    }
}

@media (max-height: 600px) {
    .tagline-container {
        padding-top: 1rem;
        margin-bottom: 1.5rem;
    }
    
    #payButton {
        padding: 0.875rem 1.75rem;
        font-size: 1.125rem;
    }
}

/* Confetti Animation Styles */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #FF416C;
}

/* Enhanced celebration animation with confetti timing */
@keyframes celebration {
    0% { 
        transform: scale(0.8) rotate(-5deg); 
        opacity: 0; 
    }
    30% { 
        transform: scale(1.15) rotate(3deg); 
        opacity: 1; 
    }
    60% { 
        transform: scale(0.95) rotate(-1deg); 
        opacity: 1; 
    }
    100% { 
        transform: scale(1) rotate(0deg); 
        opacity: 1; 
    }
}

/* Thank You Page Styles */
.thank-you-container {
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.thank-you-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: celebration 2s ease-in-out;
}

.thank-you-message {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f5f5f5;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.thank-you-submessage {
    font-size: 1rem;
    color: #cccccc;
    margin-bottom: 2rem;
    font-style: italic;
}

.thank-you-details {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border-left: 4px solid #FF416C;
    max-width: 100%;
    overflow-wrap: break-word;
}

.thank-you-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.thank-you-footer p {
    color: #aaaaaa;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.go-back-button {
    background: linear-gradient(90deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.go-back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.go-back-button:active {
    transform: translateY(1px);
}

/* Error Page Styles */
.error-container {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.error-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.125rem;
    color: #f5f5f5;
    margin-bottom: 0.5rem;
}

.error-submessage {
    font-size: 0.9rem;
    color: #aaaaaa;
    font-style: italic;
}

/* Loading Spinner Styles */
.loading-container {
    text-align: center;
    padding: 2rem;
    max-width: 400px;
    margin: 0 auto;
}

.loading-container h2 {
    color: #f5f5f5;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid rgba(255, 65, 108, 0.3);
    border-top: 4px solid #FF416C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Celebration Animation */
@keyframes celebration {
    0% { transform: scale(0.8) rotate(-5deg); opacity: 0; }
    50% { transform: scale(1.1) rotate(2deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Mobile responsiveness for thank you page */
@media (max-width: 480px) {
    .thank-you-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .thank-you-title {
        font-size: 2rem;
    }
    
    .thank-you-message {
        font-size: 1.125rem;
    }
}