/* Homepage body styling */
.homepage-body {
    font-family: Arial, sans-serif;
    background: url('images/homepage_background.jpg') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* General body styling */
/* body {
    font-family: Arial, sans-serif;
    background-color: #e0e0ff;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
} */

/* Centered Message styling */
.centered {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 100px);
    /* Adjust height considering the header */
    flex-direction: column;
}


/* Responsive design for smaller screens */
@media (max-width: 768px) {
    body {
        background: url('images/homepage_background_small_screen.jpg') no-repeat center center fixed;
        background-size: cover;
    }

    .header button {
        font-size: 12px;
        /* Slightly smaller font size for buttons on mobile */
        padding: 8px 16px;
    }

    .centered-welcome h1 {
        font-size: 36px;
        /* Adjust welcome text size on smaller screens */
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="url"] {
        font-size: 16px;
        /* Slightly larger input text for better readability on mobile */
    }

    .button-group {
        gap: 10px;
        /* Add some space between the buttons */
        align-items: center;
        /* Center align the buttons */
    }

    button[type="submit"],
    button.cancel-btn {
        width: 90%;
        /* Full width for buttons on mobile */
        margin: 5px 0;
        /* Add margin between buttons */
    }
}


/* Homepage */
.slogan {
    text-align: center;
    font-size: 64px;
    margin-bottom: 20px;
    color: #e0e0ff;
    /* Set to a lighter color for contrast */
}

.slogan-sub {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: #e0e0ff;
    /* Set to a lighter color for contrast */
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .slogan {
        font-size: 48px;
        /* Smaller font size for smaller screens */
    }

    .slogan-sub {
        font-size: 18px;
        /* Smaller font size for smaller screens */
    }
}

.subscription-section {
    width: 100%;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    top: -80px;
    /* Move the section up */
}

/* Ensure the topics input, email input, and subscribe button align */
.topics-input,
.email-input {
    display: flex;
    gap: 10px;
    align-items: center;
    /* Ensures vertical alignment */
    justify-content: center;
    width: 500px;
    /* Ensure consistent width */
}

/* Topics input box */
.topics-input input[type="text"] {
    flex: 1;
    height: 54px;
    padding: 0 20px;
    font-size: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    outline: none;
    color: #4a5568;
    background: white;
    box-sizing: border-box;
}

/* Email input and Subscribe button container */
.email-input {
    display: flex;
    align-items: center;
    /* Ensures vertical alignment */
    justify-content: center;
    /* Keeps elements centered */
    width: 500px;
    /* Same width as topics input */
    gap: 10px;
    /* Space between input and button */
    position: relative;
    /* Allows precise positioning of child elements */
    margin-top: 12px;
}

/* Email input field */
.email-input input[type="email"] {
    flex: 1;
    /* Takes most of the space */
    height: 54px;
    padding: 0 20px;
    font-size: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    outline: none;
    color: #4a5568;
    background: white;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    align-items: center;
    /* Ensures input text stays centered */
}

/* Subscribe button */
button.subscribe-button {
    height: 54px;
    /* Ensures same height as input */
    font-size: 18px;
    background-image: linear-gradient(45deg, #4458bc, #5676cc, #b387f9);
    /* Gradient colors */
    color: white;
    /* Text color */
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-image 0.5s ease;
    /* Slower transition */
    display: flex;
    align-items: center;
    /* Centers text inside button */
    justify-content: center;
    padding: 0 20px;
    min-width: 140px;
    /* Ensures button does not shrink */
    max-width: 140px;
    box-sizing: border-box;
    position: relative;
    /* top: -8px; */
}

button.subscribe-button:hover {
    background-image: linear-gradient(45deg, #b387f9, #5676cc, #4458bc);
    /* Reverse gradient on hover */
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .subscription-section {
        width: 100%;
        padding: 0 10px;
    }

    .topics-input,
    .email-input {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .topics-input input[type="text"],
    .email-input input[type="email"],
    button.subscribe-button {
        width: 100%;
        height: 60px;
        /* Ensure same height for all elements */
        font-size: 18px;
        /* Increase font size for readability */
        padding: 14px 16px;
        /* Adjust padding to create space for placeholder */
        border-radius: 30px;
        /* Keep rounded corners */
        box-sizing: border-box;
    }

    /* Adjust the placeholder text styling */
    .topics-input input[type="text"]::placeholder,
    .email-input input[type="email"]::placeholder {
        font-size: 16px;
        /* Keep the placeholder text readable */
        opacity: 1;
    }

    /* Ensure the Subscribe button aligns properly */
    button.subscribe-button {
        background-image: linear-gradient(45deg, #4458bc, #5676cc, #b387f9);
        /* Gradient colors */
        color: white;
        /* Text color */
        border: none;
        cursor: pointer;
        transition: background-color 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    button.subscribe-button:hover {
        background-image: linear-gradient(45deg, #b387f9, #5676cc, #4458bc);
        /* Reverse gradient on hover */
    }
}




/* fade in and out the placeholder text */
input[name="topics"].fade-out::placeholder {
    opacity: 0;
    transition: opacity 1s ease-out;
}

input[name="topics"].fade-in::placeholder {
    opacity: 1;
    transition: opacity 1s ease-in;
}

/* Keyframe animation for flying in from the bottom */
@keyframes flyInFromBottom {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

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

/* Initial state for the animation */
.fly-in {
    animation: flyInFromBottom 0.5s ease-out forwards;
}

/* Graph Animation Background */
.graph-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Ensure it is behind other content */
    overflow: hidden;
    pointer-events: none;
    /* Prevent interaction */
}

.graph-node {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: floatAround 10s infinite ease-in-out;
}

@keyframes floatAround {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(50px, -30px);
    }

    50% {
        transform: translate(-30px, 50px);
    }

    75% {
        transform: translate(-50px, -50px);
    }

    100% {
        transform: translate(0, 0);
    }
}

.flash-container {
    max-width: 600px;
    margin: 20px auto;
    text-align: center;
}

.flash {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
}

.flash.info {
    background-color: #d1e7ff;
    color: #084298;
}