/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* Global Variables for "Fusion" Theme */
:root {
    --bg-dark: #0a0a0a;
    --card-bg: #161616;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --neon-blue: #00f0ff;
    --neon-purple: #bf00ff;
    --metal-border: #444444;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: var(--text-main);
    line-height: 1.6;
    /* Deep radial gradient to match the logo background */
    background-image: url('assets/animated-bg.svg');
    background-size: cover;
    background-attachment: fixed;
    padding-bottom: 80px; /* ensure content isn't hidden behind fixed footer */
}

.wrapper {
    background: var(--card-bg);
    padding: 30px 25px;
    border-radius: 12px;
    max-width: 410px;
    width: 100%;
    margin: 20px;
    /* REMOVED: min-height transition. Let content dictate height. */
    min-height: auto; 
    
    /* "Metallic" Frame Effect */
    border: 2px solid #555;
    box-shadow: 
        0 0 0 1px #222,
        0 10px 30px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 240, 255, 0.05);
}

.wrapper.active {
    /* REMOVED: min-height: 520px; This was causing the "long" look */
    box-shadow: 
        0 0 0 1px #222,
        0 15px 40px rgba(0, 0, 0, 0.9),
        0 0 25px rgba(191, 0, 255, 0.15);
}

header {
    display: flex;
    align-items: center;
    gap: 15px;
}

header h1 {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Neon Glow Text Effect */
    background: linear-gradient(to right, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wrapper .form {
   margin: 20px 0 25px 0; 
}

.form :where(input, button) {
    width: 100%;
    height: 55px;
    outline: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}   

.form input {
    padding: 0 17px;
    font-size: 18px;
    background: #222;
    border: 1px solid #333;
    color: #fff;
}

.form input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.form input::placeholder {
    color: #666;
}

.form button {
    margin-top: 15px;
    border: none;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(191, 0, 255, 0.4);
}

.form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.6);
}

/* --- QR CODE CONTAINER ANIMATION FIX --- */

.wrapper .qr-code {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 5px;
    
    /* Start completely hidden and collapsed */
    opacity: 0;
    pointer-events: none;
    max-height: 0;        /* Collapse height to 0 */
    padding: 0;           /* Remove padding */
    margin-top: 0;        /* Remove margin */
    border: 0 solid #333; /* Hide border */
    overflow: hidden;     /* Ensure no content spills out */
    
    /* Smooth slide animation */
    transition: all 0.5s ease-in-out;
}

.wrapper.active .qr-code {
    opacity: 1;
    pointer-events: auto;
    max-height: 300px;    /* Allow it to grow enough to fit image + padding */
    padding: 33px 0;      /* Restore padding */
    margin-top: 20px;     /* Restore spacing from button */
    border: 1px solid #333; /* Restore border */
}

.qr-code img {
    max-width: 150px;
    width: 100%;
    display: block;
    margin: 0 auto;
    filter: invert(1);
}

/*Footer section*/

.footer {
    background-color: #121212;
    color: #aaa;
    text-align: center;
    padding: 15px 10px;
    font-size: 0.9rem;
    margin-top: 0;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

.footer a {
  color: #00f0ff;
  text-decoration: none;
  margin: 0 8px;
}

.footer a:hover {
  text-decoration: underline;
}

