/* Base styles */
body {
    margin: 0;
    padding-top: 60px;
    font-family: 'Inter', Arial, sans-serif;
    background-image: linear-gradient(rgba(44, 44, 44, 0.8), rgba(20, 20, 20, 0.8)), url('images/bg.png');
    background-size: cover;
    background-position: center center;
    color: #eee;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

/* Animated background overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #1c1c1c, #2a2a2a, #3b3b3b, #1c1c1c);
    background-size: 400% 400%;
    animation: gradientFade 20s ease infinite;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

/* Animations */
@keyframes fadeInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientFade {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes fadeInNav {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FadeIn animation for navbar */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Navbar */
nav {
    background-color: #1e1e1e;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    z-index: 1000;
    animation: fadeIn 0.3s forwards;
    opacity: 1;
}

/* Logo (nav heading) */
nav h1, nav .logo {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: #ff2e2e;
    font-weight: 700;
    margin: 0;
}

/* Navigation buttons container */
.nav-buttons {
    display: flex;
    gap: 1rem;
}

/* Nav buttons style */
.nav-buttons a {
    background-color: #ff2e2e;
    color: #fff;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(255, 46, 46, 0.3);
    transition: all 0.3s ease;
}

.nav-buttons a:hover {
    background-color: #e62626;
    transform: scale(1.05);
}

/* Container */
.container {
    background: linear-gradient(-45deg, #2b2b2b, #3a3a3a, #4a4a4a, #2b2b2b);
    background-size: 400% 400%;
    animation: gradientFade 12s ease infinite, fadeInFromTop 1s ease-out forwards;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
    max-width: 400px;
    width: 90%;
    text-align: center;
    opacity: 0;
    animation-delay: 0.5s;
}

/* Headings */
h1 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 2rem;
}

/* Form */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

label {
    font-size: 1rem;
    color: #ddd;
    display: block;
    margin-bottom: 5px;
}

input[type="text"] {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 1px solid #888;
    border-radius: 5px;
    background-color: #444;
    color: #fff;
    box-sizing: border-box;
}

/* Button */
button {
    background-color: #d63031;
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #b71c1c;
}

/* Output message */
#output-message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    display: none;
    animation: fadeInNav 1s ease-out forwards;
    word-wrap: break-word;
    font-size: 0.95rem;
}

.success {
    background-color: #2ecc71;
    color: white;
}

.error {
    background-color: #d63031;
    color: white;
}

/* Footer */
footer {
    font-size: 1rem;
    color: #ccc;
    margin-top: 20px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    nav {
        padding: 1rem 1.5rem;
        flex-direction: row; /* keep horizontal layout */
    }

    nav h1, nav .logo {
        font-size: 1.5rem;
    }

    .nav-buttons {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .nav-buttons a {
        padding: 0.5rem 1rem;
        font-size: 1rem;
        margin: 0;
    }

    .container {
        max-width: 90%;
    }

    h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 500px) {
    nav h1, nav .logo {
        font-size: 1.2rem;
    }

    .nav-buttons a {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .container {
        max-width: 95%;
    }

    h1 {
        font-size: 1.6rem;
    }

    button {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}

/* Aurora animated background layer */
.aurora {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, #101010, #101010, #101010, #302020);
    background-size: 800% 800%;
    animation: auroraFlow 20s ease infinite;
    opacity: 0.2;
    z-index: -3;
}

@keyframes auroraFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Cyber grid pattern */
.gridlines::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: pulseGrid 2s ease-in-out infinite alternate;
    z-index: -4;
    pointer-events: none;
}

@keyframes pulseGrid {
    0% {
        opacity: 0.03;
    }
    100% {
        opacity: 0.1;
    }
}

/* Floating orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(22, 0, 0, 0.4), transparent);
    pointer-events: none;
    z-index: -2;
    animation: floatOrb 30s linear infinite;
}

.orb:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}
.orb:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 60%;
    left: 70%;
    animation-delay: 10s;
}
.orb:nth-child(3) {
    width: 250px;
    height: 250px;
    top: 30%;
    left: 50%;
    animation-delay: 20s;
}

@keyframes floatOrb {
    0% {
        transform: translateY(0px) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) scale(1.05);
        opacity: 0.5;
    }
    100% {
        transform: translateY(0px) scale(1);
        opacity: 0.3;
    }
}
