:root {
    --primary-color: #5B45F5;
    --primary-hover: #4A39D9;
    --secondary-color: #7C3AED;
    --accent-color: #EC4899;
    --background-color: #FAFAFF;
    --card-color: #FFFFFF;
    --text-color: #1F2937;
    --text-secondary: #6B7280;
    --success-bg: #F0FDF4;
    --success-text: #166534;
    --error-color: #DC2626;
    --border-color: #E5E7EB;
    --input-bg: #F9FAFB;
    --hover-bg: #F3F4F6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

html {
    font-size: 16px;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: 540px;
    padding: 3rem 2.5rem;
    background: var(--card-color);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-lg);
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.logo {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(
        to right,
        var(--primary-color),
        var(--accent-color)
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary-color);
}

h1 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    color: #111827;
}

p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
    font-size: 1.125rem;
}

.waitlist-count {
    text-align: center;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.count-number {
    color: var(--primary-color);
    font-size: 1.125rem;
    font-weight: 700;
}

form {
    margin-bottom: 1.5rem;
}

.form-control {
    margin-bottom: 1.25rem;
}

input[type="email"] {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--input-bg);
    transition: all 0.2s ease;
    font-family: inherit;
}

input[type="email"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(91, 69, 245, 0.1);
    outline: none;
}

button {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.0625rem;
    font-weight: 600;
    border: none;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
    font-family: inherit;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

button:active {
    transform: translateY(0);
}

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

.success-message {
    text-align: left;
    background: var(--success-bg);
    color: var(--success-text);
    padding: 1.25rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    display: none;
    font-weight: 500;
    border-left: 4px solid var(--success-text);
    animation: fadeIn 0.5s ease-out;
}

.referral-info {
    text-align: center;
    margin: 3rem 0 0.5rem;
    padding: 2rem;
    border-radius: 1rem;
    background: rgba(245, 243, 255, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.15);
    display: none;
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.referral-info p {
    margin-bottom: 1rem;
}

.referral-link {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 0.9375rem;
    border: 1px dashed var(--border-color);
    margin: 1.25rem 0;
    word-break: break-all;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    padding-right: 3rem;
}

.referral-link::after {
    content: 'Copy';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.8125rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.referral-link:hover::after {
    opacity: 1;
}

.referral-link:hover {
    background-color: var(--hover-bg);
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 3rem auto;
    flex-wrap: wrap;
    padding: 0 1rem;
    max-width: 420px;
}

.share-button {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    padding: 0;
    background: white;
}

/* Button hover effect */
.share-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

/* Button press effect */
.share-button:active {
    transform: scale(0.96);
}

/* Button hover state */
.share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.share-button:hover::before {
    opacity: 1;
}

/* Icon styling */
.share-button img.share-icon,
.share-button svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    object-fit: contain;
}

/* Make Bluesky icon fill the button */
#share-bluesky {
    padding: 0;
    overflow: hidden;
}

#share-bluesky img.share-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1); /* Slight scale to ensure full coverage */
}

/* Bluesky logo specific */
#share-bluesky img.share-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

/* Button colors */
#share-bluesky { background: #1185F0; }
#share-twitter { background: #1DA1F2; }
#share-facebook { background: #1877F2; }
#share-linkedin { background: #0A66C2; }
#share-email { background: #6B7280; }

/* Hover states - slightly darker */
#share-bluesky:hover { background: #0e70d0; }
#share-twitter:hover { background: #1a8cd8; }
#share-facebook:hover { background: #166fe5; }
#share-linkedin:hover { background: #0a5a9e; }
#share-email:hover { background: #4B5563; }

/* Icon colors - ensure white for better contrast */
#share-bluesky svg,
#share-twitter svg,
#share-facebook svg,
#share-linkedin svg,
#share-email svg {
    fill: white;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .share-buttons {
        gap: 0.75rem;
        padding: 0 0.5rem;
    }
    
    .share-button {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }
    
    .share-button img.share-icon,
    .share-button svg {
        width: 26px;
        height: 26px;
    }
}

.queue-position {
    font-weight: 700;
    color: var(--primary-color);
}

.error-message {
    color: var(--error-color);
    margin-top: 0.5rem;
    font-size: 0.875rem;
    display: none;
    text-align: left;
}

.privacy-notice {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
}

.privacy-notice a {
    color: var(--primary-color);
    text-decoration: none;
}

.privacy-notice a:hover {
    text-decoration: underline;
}

.content-spacer {
    height: 1.5rem; /* Adjust as needed */
}

.integrated-footer-info {
    text-align: center;
    margin-top: 3.5rem;
    padding: 2rem 1.5rem 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0 0 1rem 1rem;
    margin-top: -1.5rem;
    padding-top: 3rem;
}

.integrated-footer-info::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.integrated-footer-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.integrated-footer-info a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.integrated-footer-info p:last-child {
    margin-bottom: 0;
}

/* Media Queries for Responsive Design */
@media screen and (max-width: 480px) {
    .container {
        padding: 1.5rem; 
        margin-top: 1rem; 
        margin-bottom: 1rem; 
    }
    .content-spacer {
        height: 1rem; /* Adjust for mobile if needed */
    }
    .integrated-footer-info {
        margin-top: 0; /* Removed margin for mobile */
        padding-top: 1rem;
    }

    h1 {
        font-size: 1.2rem;
    }

    .logo {
        font-size: 1.75rem;
    }

    .share-button {
        width: 2.75rem;
        height: 2.75rem;
    }

    .share-button svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

@media screen and (min-width: 768px) {
    .container {
        padding: 3rem;
    }

    h1 {
        font-size: 1.2rem;
        margin-bottom: 1.25rem;
    }

    .logo {
        font-size: 2.25rem;
        margin-bottom: 2rem;
    }
}

@media screen and (max-width: 640px) {
    .container {
        margin: 0.5rem;
        padding: 1.5rem 1.25rem;
        border-radius: 0.75rem;
    }
    
    h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .referral-info {
        padding: 1.5rem 1.25rem;
        margin: 2.5rem -0.5rem 0;
        border-radius: 0.75rem 0.75rem 0 0;
    }
    
    .share-buttons {
        gap: 0.75rem;
        margin: 2rem 0 2.5rem;
    }
    
    .share-button {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }
    
    .share-button svg {
        width: 22px;
        height: 22px;
    }
    
    .integrated-footer-info {
        margin: -1rem -0.5rem 0;
        padding: 2.5rem 1rem 1.5rem;
        border-radius: 0 0 0.75rem 0.75rem;
    }
    
    .waitlist-count {
        font-size: 0.9375rem;
    }
    
    .logo {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
