.intermediate-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.intermediate-modal.active {
    opacity: 1;
    visibility: visible;
}

.intermediate-modal-content {
    background: linear-gradient(135deg, #042878, #0a9bf4);
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    padding: 35px 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: white;
    overflow: hidden;
    text-align: center;
}

.close-intermediate-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #45424b;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 1100;
}

.close-intermediate-modal:hover {
    background: rgba(255, 255, 255, 0.4);
}

.intermediate-logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo-intermediate {
    height: 60px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

.intermediate-title {
    font-size: 28px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    color: #f2c632;
}

.intermediate-description {
    text-align: center;
    margin-bottom: 30px;
    font-size: 18px;
    line-height: 1.5;
    opacity: 0.9;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.continue-button {
    padding: 15px 25px;
    background: white;
    color: #042878;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 25px;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.continue-button:hover {
    background: #042878;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.invitation-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.invitation-text {
    font-size: 16px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.invitation-input-container {
    position: relative;
    display: inline-block;
    gap: 10px;
    max-width: 350px;
    margin: 0 auto;
    justify-content: center;
}

.invitation-input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    color: white;
    font-size: 16px;
    outline: none;
    text-align: center; /* Center the text */
    text-transform: uppercase; /* Force uppercase */
    letter-spacing: 2px; /* Space out characters */
    max-width: 140px;
    margin: 0 auto;
}

.invitation-input::placeholder {
    color: rgba(255, 255, 255, 0.1); /* Very low opacity placeholder */
    text-align: center;
    letter-spacing: 3px;
    font-size: 16px;
}

.invitation-input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.apply-code-button {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.apply-code-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.privacy-notice {
  font-size: 12px;
  margin-top: -20px;
}

/* Referral code validation styles */
.invitation-input.field-success {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.invitation-input.field-error {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.invitation-input-container::after {
    content: attr(data-error) attr(data-success);
    display: block;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    text-align: center;
}

.invitation-input-container[data-error]::after {
    color: #dc3545;
}

.invitation-input-container[data-success]::after {
    color: #28a745;
}

.apply-code-button.button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.apply-code-button.button-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.apply-code-button.button-error {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}
