/* Base Reset to prevent overflow issues */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #05041F;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    /* Flexbox centers everything on the screen perfectly */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px; /* Keeps the box from touching the screen edges on mobile */
}

.wrapper {
    width: 100%;
    max-width: 380px; /* Box won't grow larger than this on desktop */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container {
    margin-bottom: 30px;
    width: 100%;
    text-align: center;
}

.logo {
    width: 100%;
    max-width: 250px; /* Keeps the logo proportionate */
    height: auto;
}

.login-container {
    background: linear-gradient(145deg, #18173d, #0d0c2b);
    padding: 40px 30px;
    border-radius: 8px;
    border: 1px solid #3d3b6b;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    width: 100%; /* Adapts dynamically to the wrapper size */
}

.login-container h2 {
    margin-bottom: 25px;
    letter-spacing: 2px;
    text-align: center;
}

.input-group {
    margin-bottom: 20px;
    width: 100%;
}

.input-group input {
    width: 100%;
    padding: 14px 15px;
    background-color: #05041F;
    border: 1px solid #2a2952;
    color: white;
    border-radius: 6px;
    outline: none;
    /* 16px is crucial: it prevents iPhones from automatically zooming in when you tap the input */
    font-size: 16px; 
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: #d69847;
}

#login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(to bottom, #f0c384, #be7e29);
    border: none;
    color: black;
    font-weight: bold;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(220, 150, 50, 0.3);
    transition: all 0.2s ease-in-out;
    margin-top: 10px;
}

#login-btn:hover {
    background: linear-gradient(to bottom, #ffdb9c, #d19646);
    transform: translateY(-2px);
}

/* --- RESPONSIVE MEDIA QUERY --- */
/* If the screen is narrower than 400px (like small mobile phones) */
@media (max-width: 400px) {
    .login-container {
        padding: 30px 20px; /* Shrinks the inner padding to save space */
    }
    .logo {
        max-width: 200px; /* Shrinks the logo slightly */
    }
}
