body {
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    margin: 0;
    background-color: #f8f9fa;
    color: #343a40;
    /* overflow: hidden; */
    /* Prevent scrollbars for the canvas background */
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 1;
    /* Ensure content is above the canvas */
    position: relative;
    /* For positioning the canvas behind */
}

body {
    display: block;
    background-color: #111;
}

/* Add vertical spacing between main containers */
.referral-card,
.container,
.apply-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

canvas {
    margin: auto;
}

span {
    color: #777;
    position: absolute;
    top: 20px;
    left: 20px;
    user-select: none;
}

.logo {
    top: 20px;
    left: 20px;
    width: 80px;
    /* Adjust size as needed */
    height: auto;
    /* position: absolute; */
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Place canvas behind the content */
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

ul {
    font-size: 1.2rem;
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 1.5rem;
}

strong {
    font-weight: 600;
}




.highlight {
    background-color: #f1f3f5;
    /* Subtle highlight */
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.referral-card {
    background: #111;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin: 2rem auto 30px auto;
    color: #fff;
    max-width: 800px;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 2;
}

.referral-card a {
    color: #fff;
}

.referral-card.minimized {
    padding: 20px 40px;
}

.referral-card.minimized .referral-content {
    display: none;
}

.referral-card.minimized .referral-toggle {
    transform: rotate(180deg);
}

.referral-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.referral-title {
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.referral-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.referral-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.referral-content {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.referral-text {
    flex: 1;
    min-width: 300px;
}

.referral-form {
    flex: 1;
    min-width: 350px;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.referral-form.hidden {
    display: none;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: white;
    font-size: 1rem;
}



.form-group input {
    width: 90%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.form-group.hidden {
    display: none;
}

.form-group.visible {
    display: block;
    animation: slideDown 0.3s ease;
}

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

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

.get-link-btn {
    background: white;
    color: #000000;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.get-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

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


.success-message {
    background: #48bb78;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
    font-weight: 600;
}

.error-message {
    background: #ff0000;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
    font-weight: 600;
}

.referral-link-container {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    display: none;
}

.referral-link-container.visible {
    display: block;
}

.referral-link-container h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.link-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 15px;
}

.link-text {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #333;
    word-break: break-all;
    line-height: 1.4;
}

.copy-btn {
    background: linear-gradient(135deg, #667eea, #000000);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.copy-btn.copied {
    background: #48bb78;
}

.copy-btn.copied::after {
    content: " ✓";
}

.apply-section {
    /* Match style of .referral-card */
    background: #111 !important;
    color: #fff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 800px;
    margin: 2rem auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    /* Ensure it stays above the fixed background canvas and accepts pointer events */
    position: relative;
    z-index: 1;
}

/* Headings are already white */
.apply-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #fff;
}

.apply-form {
    max-width: 500px;
    margin: 0 auto;
}

/* Submit button styling aligned with get-link-btn */
.submit-btn {
    background: #fff;
    color: #111;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: block;
    box-sizing: border-box;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

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

.terms-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.terms-group label {
    display: inline;
    margin: 0;
}

.terms-group label a {
    color: #ffffff;
    text-decoration: underline;
}

.terms-checkbox {
    width: auto !important;
}