*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-color: #0d1117;
    --primary-cyan: #00f2ff;
    --accent-white: #ffffff;
    --error-red: #ff4b4b;
}

body {
    background-color: var(--bg-color);
    color: var(--accent-white);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
}

.landing-header {
    width: 100%;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
}

.landing-logo {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-cyan);
    letter-spacing: 1px;
}

.landing-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 520px;
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    gap: 2rem;
}

@media (min-width: 768px) {
    .landing-main {
        flex-direction: row;
        align-items: center;
        max-width: 960px;
        gap: 3rem;
    }

    .hero-section {
        flex: 1;
    }

    .login-section {
        flex: 0 0 340px;
    }
}

.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.robot-showcase {
    width: min(80vw, 400px);
    animation: robotFadeIn 1s ease-out, breathe 4s ease-in-out 1s infinite;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

@keyframes robotFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

.robot-svg {
    width: 100%;
    height: auto;
    fill: none;
    stroke: var(--primary-cyan);
    stroke-width: 4;
    stroke-linecap: round;
}

@keyframes blink {
    0%, 45%, 55%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.1); }
}

.eye-group {
    transform-origin: center center;
    animation: blink 4s infinite;
    will-change: transform;
    backface-visibility: hidden;
}

.eye-ring { transition: all 0.3s; }
.eye-pupil { transition: all 0.3s; }
.mouth { transition: all 0.3s ease; }
.eyebrow { transition: all 0.3s; }

.hero-text {
    text-align: center;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-cyan);
    margin-bottom: 0.25rem;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(0, 242, 255, 0.85);
    margin-bottom: 0.5rem;
}

.hero-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

.login-section {
    width: 100%;
}

.login-section form {
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.field {
    margin-bottom: 1rem;
    text-align: left;
}

.field label {
    display: block;
    font-size: 0.8rem;
    color: rgba(0, 242, 255, 0.7);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.field input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid rgba(0, 242, 255, 0.3);
    background: rgba(0, 242, 255, 0.08);
    color: var(--accent-white);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

.field input:focus {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.field input::placeholder {
    color: rgba(0, 242, 255, 0.5);
}

.error-msg {
    color: var(--error-red);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    min-height: 1.2em;
}

.login-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--primary-cyan);
    color: var(--bg-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    font-family: inherit;
}

.login-btn:hover {
    background: #33f5ff;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.login-btn:active {
    transform: scale(0.98);
}

.login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-btn:focus-visible {
    outline: 3px solid var(--accent-white);
    outline-offset: 3px;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.5);
}

.landing-footer {
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
}

@media (orientation: landscape) and (max-height: 500px) {
    .landing-main {
        gap: 1.5rem;
        padding-top: 0.5rem;
    }

    .hero-section {
        gap: 0.75rem;
    }

    .robot-showcase {
        width: min(200px, 30vw);
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 0.8rem;
    }

    .login-section form {
        padding: 1rem;
    }

    .field {
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .robot-showcase {
        width: min(70vw, 280px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .eye-group { animation: none; }
    .robot-showcase { animation: none; opacity: 1; transform: none; will-change: auto; }
    .login-btn { transition: none; }
    .field input { transition: none; }
}