/* --- Overlay System --- */
#page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color); /* Changed from transparent to solid */
    display: flex;
    flex-direction: column; /* Stack content vertically */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
    color: var(--text-primary);
    overflow: hidden; /* Prevent scrollbars on the overlay itself */
}

.overlay-content {
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    /* Removed background, border-radius, box-shadow for full-page feel */
}

.overlay-icon {
    width: 120px; /* Increased size */
    height: 120px; /* Increased size */
    margin-bottom: 32px;
    filter: var(--glow-filter);
    opacity: 0;
    transform: translateY(20px);
    animation: floatUp 0.6s 0.2s ease forwards; /* New animation */
}

.overlay-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s 0.4s ease forwards; /* New animation */
}

.overlay-content p {
    font-size: 1.2rem;
    margin-bottom: 32px;
    color: var(--text-secondary);
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s 0.6s ease forwards; /* New animation */
}

.overlay-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s 0.8s ease forwards; /* New animation */
}

.overlay-buttons .cta-button {
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.overlay-buttons .cta-button {
    background-color: var(--accent-color);
    color: white;
}

.overlay-buttons .cta-button:hover {
    background-color: var(--accent-color-darker);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.overlay-buttons .cta-button.secondary {
    background-color: var(--secondary-button-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.overlay-buttons .cta-button.secondary:hover {
    background-color: var(--secondary-button-hover-bg);
    border-color: var(--border-color-hover);
}

/* --- Keyframe Animations --- */

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes floatUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Remove old scaleIn animation as it's no longer needed */