/* General Styles */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

.background-gradient {
    background: linear-gradient(to bottom, #3a66c9, #0f2a5a, #000000);
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 10px; /* Added padding for smaller screens */
}

/* Main Title */
.main-title {
    color: white;
    font-weight: bold;
    font-size: 4rem; /* Adjusted size for smaller screens */
    text-align: center;
    animation: subtlePulseGlow 2s infinite ease-in-out;
    margin: 0 10px; /* Added margin for better spacing on mobile */
}

/* Email Input Container */
.email-input-container {
    display: flex;
    justify-content: center; /* Center the input and button container */
    align-items: center;
    margin-top: 20px;
}

form {
    display: flex;
    align-items: center; /* Align the input and button vertically */
    gap: 10px; /* Add spacing between input and button */
}

.email-input {
    flex: 1; /* Allow the input to take up available space */
    max-width: 300px; /* Set a max width for the input */
    padding: 10px;
    font-size: 16px;
    border: 1px solid #182269;
    border-radius: 5px;
    background-color: #adadad;
    box-shadow: 0 2px 4px rgba(104, 104, 104, 0.1);
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.email-input:focus {
    border-color: #00bfff;
    box-shadow: 0 4px 8px rgba(255, 127, 80, 0.2);
    background-color: #edfdff;
}

.email-input::placeholder {
    color: #4b4b4b;
}

.submit-button {
    padding: 10px 20px;
    font-size: 16px;
    color: #edfdff;
    background-color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.submit-button:hover {
    background-color: #1381ff;
    box-shadow: 0 4px 8px rgba(255, 127, 80, 0.3);
}


/* Keyword Container */
#keywords-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden; /* Prevents overflow on smaller screens */
}

.keyword {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    animation: twinkle 2s ease-in-out infinite;
    opacity: 0;
    transition: top 0.5s, left 0.5s;
}

/* Grid Overlay */
#grid-overlay .grid-cell {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animations */

/* Subtle Pulse Glow */
@keyframes subtlePulseGlow {
    0%, 100% {
        text-shadow: 0 0 3px rgba(255, 255, 255, 0.5), 0 0 5px rgba(255, 255, 255, 0.4);
        color: rgba(255, 255, 255, 1);
    }
    50% {
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.6), 0 0 10px rgba(255, 255, 255, 0.5);
        color: rgba(255, 255, 255, 1);
    }
}

/* Twinkling Effect */
@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem; /* Smaller font size for smaller screens */
        animation: subtlePulseGlow 2s infinite ease-in-out; /* Ensure animation is not removed */
    }

    .email-input {
        font-size: 14px; /* Smaller font size */
    }

    .submit-button {
        font-size: 14px; /* Smaller button text */
    }

    .keyword {
        font-size: 1rem; /* Reduce keyword size for better fit */
        animation: twinkle 2s ease-in-out infinite; /* Ensure animation persists */
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem; /* Even smaller for very narrow screens */
    }

    .email-input {
        font-size: 12px; /* Reduce input font size */
        padding: 8px; /* Reduce padding for smaller devices */
    }

    .submit-button {
        font-size: 12px; /* Smaller button text */
        padding: 8px; /* Reduce padding */
    }

    .keyword {
        font-size: 0.8rem; /* Further reduce keyword size */
    }
}

.subtitle {
    color: rgba(133, 133, 133, 0.9);
    font-size: 1.1rem;
    text-align: center;
    font-weight: normal;
    margin: 10px 10px 20px;
    /* animation: subtlePulseGlow 3s infinite ease-in-out; */
}