/*====================================================
        = VARIABLES
        ====================================================*/
:root {
    --gold: #c9a45b;
    --gold-light: #e6c27a;
    --gold-dark: #8b642f;
    --gold-gradient: linear-gradient(135deg,
            #8b642f 0%,
            #c9a45b 45%,
            #f2d188 100%);
    --black: #050505;
    --black-soft: #0d0d0d;
    --white: #ffffff;
    --gray: #b8b8b8;
    --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/*====================================================
        = RESET & BASE
        ====================================================*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--black);
    color: white;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    overflow-x: clip;
    display: flex;
    flex-direction: column;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/*====================================================
        = BACKGROUND & EFFECTS
        ====================================================*/
.bg-system {
    position: fixed;
    inset: 0;
    z-index: -10;
    background:
        radial-gradient(circle at 15% 50%,
            rgba(201, 164, 91, 0.08),
            transparent 40%),
        radial-gradient(circle at 85% 15%,
            rgba(201, 164, 91, 0.05),
            transparent 30%),
        #020202;
}

.bg-noise {
    position: absolute;
    inset: 0;
    opacity: 0.02;
    background-image: url("https://www.transparenttextures.com/patterns/carbon-fibre.png");
    pointer-events: none;
}

/*====================================================
        = MAIN LAYOUT
        ====================================================*/
.main-container {
    flex: 1;
    display: flex;
    width: 100%;
    min-height: 0;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* Left Side: Brand */
.brand-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 40px;
    min-width: 0;
}

.brand-bike {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.brand-bike .bike-img-container {
    position: relative;
    width: 110%;
    max-width: 600px;
    margin-bottom: 30px;
}

.brand-bike img.bike-main {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.45) contrast(1.05) saturate(0.7);
    mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
    -webkit-mask-image: radial-gradient(circle at center,
            black 40%,
            transparent 85%);
}

.main-logo-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    pointer-events: none;
    animation: logoFloat 6s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(201, 164, 91, 0.35));
}

.brand-content {
    text-align: center;
    margin-top: 20px;
}

.brand-name {
    font-size: 1rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #d1d1d1;
    font-weight: 400;
    opacity: 0.9;
}

/* Right Side: Login */
.login-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    min-width: 0;
    overflow: hidden;
}

/*====================================================
        = CLOCK
        ====================================================*/
.clock-block {
    position: absolute;
    top: 40px;
    left: 50px;
    text-align: left;
    z-index: 10;
}

.clock-time {
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
    letter-spacing: 1px;
}

.clock-date {
    font-size: 0.9rem;
    color: #999;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

/*====================================================
        = GLASS CARD
        ====================================================*/
.glass-card {
    width: 100%;
    max-width: 490px;
    padding: 44px;
    background: linear-gradient(165deg,
            rgba(20, 20, 20, 0.7),
            rgba(10, 10, 10, 0.85));
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 40px;
    border: 1px solid rgba(201, 164, 91, 0.2);
    box-shadow:
        0 50px 100px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(201, 164, 91, 0.05);
    position: relative;
    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.subtitle {
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.title {
    font-size: 2.8rem;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: -1.5px;
}

.title-divider {
    width: 60px;
    height: 2px;
    background: var(--gold-gradient);
    margin: 14px auto 0;
    border-radius: 2px;
}

/*====================================================
        = FORM ELEMENTS
        ====================================================*/
.form-group {
    margin-bottom: 20px;
}

.input-box {
    background: rgba(15, 15, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 62px;
    transition: var(--transition);
}

.input-box:focus-within {
    border-color: rgba(201, 164, 91, 0.5);
    background: rgba(25, 25, 25, 0.8);
    box-shadow: 0 0 25px rgba(201, 164, 91, 0.1);
}

.input-box i:not(.toggle-password i) {
    color: var(--gold);
    font-size: 1.1rem;
    width: 35px;
    opacity: 0.8;
}

.input-box input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    flex: 1;
    font-size: 1.05rem;
    padding: 0 15px;
    height: 100%;
}

.input-box input::placeholder {
    color: #555;
}

.toggle-password {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 10px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--gold);
}

.btn-login {
    width: 100%;
    height: 56px;
    background: var(--gold-gradient);
    border: none;
    border-radius: 16px;
    color: #000;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 15px 30px rgba(139, 100, 47, 0.25);
    text-transform: uppercase;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(139, 100, 47, 0.4);
    filter: brightness(1.1);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.error-msg {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(192, 57, 43, 0.15);
    border: 1px solid rgba(192, 57, 43, 0.3);
    border-radius: 12px;
    color: #e74c3c;
    font-size: 0.85rem;
    text-align: center;
    animation: shakeX 0.4s ease;
}

.error-msg.visible {
    display: flex;
}

.forgot-link {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    color: var(--gold-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    opacity: 0.8;
}

.forgot-link:hover {
    opacity: 1;
    color: white;
}

@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/*====================================================
= FOOTER
        ====================================================*/
.site-footer {
    padding: 16px 40px;
    text-align: center;
    color: #555;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-credits {
    font-size: 0.7rem;
    color: #444;
}

.footer-credits a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition);
}

.footer-credits a:hover {
    color: var(--gold-light);
}

.footer-credits .dev-link {
    font-weight: 600;
}

/*====================================================
        = RESPONSIVE — LARGE SCREENS (no scroll + clock position)
        ====================================================*/
@media (min-width: 1024px) {
    body {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    .clock-block {
        left: 50px;
        top: 40px;
    }
}

/*====================================================
        = SHORT SCREENS — Nest Hub 1024x600, laptops landscape
        Brand section stays visible, everything scales down.
        ====================================================*/
@media (max-height: 700px) and (min-width: 1024px) {
    .clock-block {
        top: 16px;
        left: 30px;
    }

    .clock-time {
        font-size: 2rem;
    }

    .clock-date {
        font-size: 0.75rem;
        margin-top: 4px;
    }

    .brand-section {
        padding: 16px 30px;
    }

    .brand-bike .bike-img-container {
        max-width: 360px;
        margin-bottom: 12px;
    }

    .main-logo-overlay {
        width: 60%;
    }

    .brand-content {
        margin-top: 10px;
    }

    .brand-name {
        font-size: 0.85rem;
        letter-spacing: 3px;
    }

    .login-section {
        padding: 16px 30px;
    }

    .glass-card {
        padding: 30px 36px;
        border-radius: 36px;
        max-width: 400px;
    }

    .login-header {
        margin-bottom: 20px;
    }

    .subtitle {
        font-size: 0.7rem;
        margin-bottom: 6px;
    }

    .title {
        font-size: 2.4rem;
        letter-spacing: -1px;
    }

    .title-divider {
        width: 50px;
        margin: 10px auto 0;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .input-box {
        height: 54px;
        border-radius: 16px;
        padding: 0 18px;
    }

    .input-box i:not(.toggle-password i) {
        font-size: 0.95rem;
        width: 28px;
    }

    .input-box input {
        font-size: 0.95rem;
    }

    .btn-login {
        height: 52px;
        border-radius: 16px;
        font-size: 0.95rem;
        letter-spacing: 1.5px;
    }

    .site-footer {
        padding: 10px;
        font-size: 0.7rem;
    }
}

/*====================================================
        = TABLET & MOBILE (stacked layout, scroll allowed)
        ====================================================*/
@media (max-width: 1023px) {
    body {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto;
    }

    .main-container {
        flex-direction: column;
        min-height: auto;
        height: auto;
        overflow: visible;
    }

    .brand-section {
        min-height: 45vh;
        padding: 80px 20px 40px;
        flex-shrink: 0;
    }

    .brand-bike .bike-img-container {
        max-width: 400px;
    }

    .main-logo-overlay {
        width: 65%;
    }

    .login-section {
        min-height: 55vh;
        padding: 0 20px 60px;
        align-items: flex-start;
    }

    .clock-block {
        top: 20px;
        left: 20px;
        right: auto;
    }

    .clock-time {
        font-size: 2rem;
    }

    .glass-card {
        padding: 36px 28px;
        border-radius: 36px;
        max-width: 400px;
    }

    .title {
        font-size: 2.4rem;
    }

    .subtitle {
        font-size: 0.75rem;
    }

    .login-header {
        margin-bottom: 24px;
    }

    .input-box {
        height: 56px;
        border-radius: 14px;
    }

    .btn-login {
        height: 52px;
        border-radius: 14px;
    }

    .site-footer {
        padding: 16px;
    }

    /* Gradient overlay on brand for mobile readability */
    .brand-section::after {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at center,
                transparent 30%,
                var(--black) 100%);
        z-index: 3;
        pointer-events: none;
    }
}

/*====================================================
        = SMALL PHONES
        ====================================================*/
@media (max-width: 480px) {
    .brand-section {
        min-height: 38vh;
        padding: 60px 16px 30px;
    }

    .brand-bike .bike-img-container {
        max-width: 300px;
    }

    .main-logo-overlay {
        width: 55%;
    }

    .brand-name {
        font-size: 0.75rem;
        letter-spacing: 2px;
    }

    .glass-card {
        padding: 32px 22px;
        border-radius: 32px;
        max-width: 360px;
    }

    .title {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 0.7rem;
    }

    .login-header {
        margin-bottom: 24px;
    }

    .input-box {
        height: 56px;
        border-radius: 16px;
        padding: 0 16px;
    }

    .btn-login {
        height: 54px;
        border-radius: 16px;
        font-size: 0.95rem;
    }

    .clock-block {
        top: 12px;
        left: 12px;
        right: auto;
    }

    .clock-time {
        font-size: 1.8rem;
    }

    .clock-date {
        font-size: 0.7rem;
    }
}

/*====================================================
        = ANIMATIONS
        ====================================================*/
@keyframes logoFloat {

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

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