:root {
    color-scheme: light;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, #e6f3ff 0%, #f4ecff 40%, #e1f8ff 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(1rem, 3vh, 1.5rem) clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 5vh, 3rem);
}
.login-wrapper {
    position: relative;
    width: min(1100px, 100%);
    min-height: clamp(520px, 70vh, 640px);
    display: flex;
    flex-direction: row;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 24px 60px rgba(44, 72, 99, 0.18);
    backdrop-filter: blur(6px);
}
.login-panel {
    width: 100%;
    max-width: clamp(320px, 34vw, 360px);
    padding: clamp(1.7rem, 3vw, 2.7rem);
    background-color: rgba(255, 255, 255, 0.96);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.35rem;
    z-index: 2;
}
.login-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.login-brand img {
    width: 84px;
    height: auto;
    filter: drop-shadow(0 12px 20px rgba(12, 66, 107, 0.22));
}
.login-card {
    width: 100%;
}
.login-card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0d3c61;
    margin-bottom: 1.4rem;
    text-align: left;
}
.form-label {
    font-weight: 600;
    color: #09395f;
}
.form-control {
    border-radius: 0.85rem;
    border: 1px solid rgba(9, 57, 95, 0.16);
    padding: 0.7rem 0.9rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-control:focus {
    border-color: #4aa9ff;
    box-shadow: 0 0 0 0.25rem rgba(74, 169, 255, 0.25);
}
.btn-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #2f89ff, #45c6ff);
    border: none;
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    font-weight: 600;
    color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-brand:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(45, 146, 255, 0.35);
}
.btn-brand:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.3rem rgba(69, 198, 255, 0.35);
}
.forgot-link {
    color: #1768ff;
    font-weight: 600;
    text-decoration: none;
}
.forgot-link:hover,
.forgot-link:focus {
    text-decoration: underline;
    color: #0a3e91;
}
.github-link {
    margin-top: 2rem;
    text-align: center;
}
.github-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #0d3c61;
    background: rgba(13, 60, 97, 0.08);
    font-size: 1.75rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.github-link a:hover,
.github-link a:focus-visible {
    color: #fff;
    background: #24292f;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(36, 41, 47, 0.35);
    text-decoration: none;
    outline: none;
}
.login-visual {
    position: relative;
    flex: 1;
    min-height: clamp(320px, 60vh, 520px);
    background: linear-gradient(135deg, rgba(137, 192, 255, 0.85), rgba(195, 172, 255, 0.85));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-visual::before {
    content: "";
    position: absolute;
    inset: -40% -20%;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 55%),
                radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.35) 0%, transparent 50%),
                radial-gradient(circle at 50% 90%, rgba(255, 255, 255, 0.35) 0%, transparent 50%),
                linear-gradient(135deg, rgba(72, 144, 255, 0.8), rgba(169, 103, 255, 0.75), rgba(103, 219, 255, 0.8));
    filter: blur(0px);
    background-size: 120% 120%, 120% 120%, 150% 150%, 200% 200%;
    animation: gradientFlow 18s ease-in-out infinite;
}
.login-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../img/logo.png');
    background-repeat: repeat;
    background-size: 220px auto;
    background-position: center;
    opacity: 0.08;
    mix-blend-mode: screen;
    animation: logoWave 24s linear infinite;
}
.visual-logo {
    position: relative;
    width: clamp(220px, 32vw, 320px);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    border-radius: 30%;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 30px 60px rgba(15, 73, 118, 0.25);
    overflow: hidden;
    backdrop-filter: blur(6px);
    animation: floatUp 9s ease-in-out infinite;
}
.visual-logo img {
    width: 72%;
    height: auto;
    filter: drop-shadow(0 18px 28px rgba(12, 61, 102, 0.18));
    animation: logoPulse 6s ease-in-out infinite;
}
@keyframes gradientFlow {
    0% { transform: translate3d(-6%, -4%, 0) scale(1.05); }
    50% { transform: translate3d(6%, 8%, 0) scale(1.1); }
    100% { transform: translate3d(-6%, -4%, 0) scale(1.05); }
}
@keyframes logoWave {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}
@keyframes floatUp {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-18px); }
}
@keyframes logoPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.04); opacity: 0.92; }
}
@media (max-width: 1200px) {
    .login-wrapper {
        width: min(960px, 100%);
    }
}
@media (max-width: 992px) {
    .login-wrapper {
        flex-direction: column;
        width: min(560px, 100%);
        min-height: auto;
    }
    .login-visual {
        order: -1;
        min-height: clamp(220px, 35vh, 320px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }
    .login-panel {
        max-width: 100%;
    }
    .visual-logo {
        width: clamp(160px, 28vw, 200px);
    }
}
@media (max-width: 768px) {
    body {
        padding: 0;
        align-items: flex-start;
        justify-content: flex-start;
    }
    .login-wrapper {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }
    .login-panel,
    .login-visual {
        flex: 1 1 auto;
    }
    .login-panel {
        padding: clamp(2rem, 5vw, 2.5rem);
    }
    .login-card h2 {
        font-size: clamp(1.5rem, 5vw, 1.75rem);
    }
}
@media (max-width: 576px) {
    .login-panel {
        padding: clamp(1.75rem, 6vw, 2.25rem);
    }
    .login-brand img {
        width: 68px;
    }
    .login-panel {
        gap: 1.25rem;
    }
}
@media (max-height: 780px) {
    body {
        align-items: flex-start;
        padding-top: clamp(0.75rem, 2vh, 1.25rem);
    }
    .login-wrapper {
        margin-top: 1rem;
        margin-bottom: 1.25rem;
    }
}
@media (max-height: 640px) {
    body {
        padding: 1.25rem;
    }
    .login-wrapper {
        min-height: auto;
        width: 100%;
        margin: 0;
    }
    .login-panel {
        padding: clamp(1.5rem, 3vw, 2rem);
        gap: 1.1rem;
    }
    .login-visual {
        min-height: clamp(180px, 32vh, 260px);
    }
    .github-link {
        margin-top: 1.25rem;
    }
}
