/* =================================================================
   Autonec Showroom Lock — Frontend Styles
   Dark Liquid Glass + Yellow Highlights
   ================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@700;800&display=swap');

/* ---------- Full-width dark background ---------- */
.asl-page-bg {
    background: #0a0a0a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: -1px 0;
    overflow: hidden;
    position: relative;
}

/* Noise texture overlay */
.asl-page-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ---------- Container ---------- */
.asl-container {
    max-width: 520px;
    margin: 0 auto;
    padding: 3rem 1.25rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}

/* ---------- Ambient glow blobs ---------- */
.asl-container::before,
.asl-container::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.asl-container::before {
    width: 280px;
    height: 280px;
    background: #facc15;
    top: -60px;
    left: -80px;
    animation: asl-float 8s ease-in-out infinite;
}

.asl-container::after {
    width: 220px;
    height: 220px;
    background: #eab308;
    bottom: -40px;
    right: -60px;
    animation: asl-float 10s ease-in-out infinite reverse;
}

@keyframes asl-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(15px, -20px) scale(1.05); }
    66%      { transform: translate(-10px, 10px) scale(0.95); }
}

/* ---------- Glass Cards ---------- */
.asl-card-front,
.asl-card-result {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 2.75rem 2.25rem;
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 8px 48px rgba(0, 0, 0, 0.4),
        0 2px 16px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

/* Subtle top-edge shine */
.asl-card-front::before,
.asl-card-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(250, 204, 21, 0.5) 30%, rgba(250, 204, 21, 0.8) 50%, rgba(250, 204, 21, 0.5) 70%, transparent 100%);
}

/* Inner glass reflection */
.asl-card-front::after,
.asl-card-result::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 28px 28px 0 0;
}

/* ---------- Header ---------- */
.asl-header {
    text-align: center;
    margin-bottom: 2.25rem;
    position: relative;
    z-index: 1;
}

.asl-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    background: rgba(250, 204, 21, 0.1);
    border: 1px solid rgba(250, 204, 21, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #facc15;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    position: relative;
}

.asl-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 24px;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.asl-icon:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 0 30px rgba(250, 204, 21, 0.2);
}

.asl-icon:hover::after {
    opacity: 1;
}

.asl-icon svg {
    width: 34px;
    height: 34px;
    position: relative;
    z-index: 1;
}

.asl-icon-unlocked {
    background: rgba(250, 204, 21, 0.15);
    border-color: rgba(250, 204, 21, 0.35);
    color: #facc15;
}

.asl-header h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.asl-header p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    font-weight: 400;
}

/* ---------- Form ---------- */
.asl-form {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    position: relative;
    z-index: 1;
}

.asl-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.asl-req {
    color: #facc15;
}

.asl-field input {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.asl-field input:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.asl-field input:focus {
    border-color: rgba(250, 204, 21, 0.5);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.1), 0 0 20px rgba(250, 204, 21, 0.05);
}

.asl-field input::placeholder {
    color: rgba(255, 255, 255, 0.25);
    font-weight: 400;
}

/* ---------- Button ---------- */
.asl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 1rem;
    margin-top: 0.75rem;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    color: #0a0a0a;
    background: linear-gradient(135deg, #facc15 0%, #eab308 50%, #ca8a04 100%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

/* Shine sweep effect */
.asl-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.asl-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(250, 204, 21, 0.35), 0 2px 8px rgba(250, 204, 21, 0.2);
}

.asl-btn:hover::before {
    left: 100%;
}

.asl-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(250, 204, 21, 0.25);
}

.asl-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0a0a0a;
}

.asl-spinner {
    width: 20px;
    height: 20px;
    animation: asl-spin 0.8s linear infinite;
}

@keyframes asl-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Error ---------- */
.asl-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: #fca5a5;
    font-size: 0.9rem;
    text-align: center;
    backdrop-filter: blur(8px);
}

/* ---------- Email confirmation ---------- */
.asl-icon-email {
    background: rgba(250, 204, 21, 0.15);
    border-color: rgba(250, 204, 21, 0.35);
    color: #facc15;
}

.asl-email-confirm {
    text-align: center;
    padding: 2rem 1.5rem;
    margin: 1.75rem 0;
    background: rgba(250, 204, 21, 0.04);
    border-radius: 20px;
    border: 1px solid rgba(250, 204, 21, 0.12);
    position: relative;
    z-index: 1;
}

.asl-check-anim {
    margin-bottom: 1.25rem;
}

.asl-checkmark {
    width: 64px;
    height: 64px;
    color: #facc15;
}

.asl-checkmark circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: asl-circle-draw 0.6s ease-in-out forwards;
}

.asl-checkmark path {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: asl-check-draw 0.4s ease-in-out 0.4s forwards;
}

@keyframes asl-circle-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes asl-check-draw {
    to { stroke-dashoffset: 0; }
}

.asl-email-sent-to {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 0.5rem;
}

.asl-email-address {
    font-size: 1.15rem;
    font-weight: 700;
    color: #facc15;
    margin: 0;
    letter-spacing: 0.02em;
    text-shadow: 0 0 20px rgba(250, 204, 21, 0.3);
}

.asl-sms-address {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4ade80;
    margin: 0.75rem 0 0;
    letter-spacing: 0.01em;
    text-shadow: 0 0 16px rgba(74, 222, 128, 0.25);
}

.asl-instruction {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* ---------- Animations ---------- */
.asl-fade-out {
    animation: asl-fadeOut 0.4s ease forwards;
}

.asl-fade-in {
    animation: asl-fadeIn 0.5s ease forwards;
}

@keyframes asl-fadeOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(-30px) scale(0.97); }
}

@keyframes asl-fadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.asl-shake {
    animation: asl-shake 0.5s ease;
}

@keyframes asl-shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-10px); }
    40%      { transform: translateX(10px); }
    60%      { transform: translateX(-6px); }
    80%      { transform: translateX(6px); }
}

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
    .asl-container {
        padding: 2rem 1rem;
    }

    .asl-container::before {
        width: 180px;
        height: 180px;
        filter: blur(60px);
    }

    .asl-container::after {
        width: 140px;
        height: 140px;
        filter: blur(50px);
    }

    .asl-card-front,
    .asl-card-result {
        padding: 2rem 1.5rem;
        border-radius: 22px;
    }

    .asl-header h2 {
        font-size: 1.35rem;
    }

    .asl-code {
        font-size: 2.2rem;
        letter-spacing: 0.25em;
    }
}
