/* ==============================
Mohajan AeroLock
=============================== */

/* --- DESIGN VARIABLES --- */
:root {
    /* Background */
    --bg-color: #0b0f1a;

    /* Neon Orbs */
    --orb-1: #150f76;
    --orb-2: #3b82f6;
    --orb-3: #2c0b6d;

    /* Glass Card */
    --glass-bg: rgba(20, 25, 50, 0.85);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-highlight: rgba(255, 255, 255, 0.12);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);

    /* Text & Keys */
    --text-main: #e0e7ff;
    --text-muted: #a5b4fc;
    --key-bg: rgba(255, 255, 255, 0.08);
    --key-hover: rgba(255, 255, 255, 0.2);
    --key-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);

    /* Accent / Status */
    --accent: #0ea5e9;
    --success: #34d399;
    --error: #f43f5e;

    /* Icon Background */
    --icon-bg: rgba(255, 255, 255, 0.07);
}

/* --- LIGHT THEME OVERRIDES --- */
body.light-theme {
    --bg-color: #eef2f6;

    --orb-1: #c4b5fd;
    --orb-2: #93c5fd;
    --orb-3: #f9a8d4;

    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.5);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 0 0 1px rgba(255, 255, 255, 0.7);

    --text-main: #0f172a;
    --text-muted: #475569;
    --key-bg: rgba(255, 255, 255, 0.7);
    --key-hover: #ffffff;
    --key-shadow: 0 2px 5px rgba(100, 116, 139, 0.15);

    --accent: #0ea5e9;
    --success: #10b981;
    --error: #ef4444;
    --icon-bg: rgba(0, 0, 0, 0.05);
}

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

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    overflow: hidden;
    transition: background-color 0.5s ease;
}

/* --- BACKGROUND ORBS --- */
.background-fx {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
    transition: background 0.5s ease;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--orb-1);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--orb-2);
    bottom: 10%;
    right: -5%;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: var(--orb-3);
    bottom: 40%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* --- THEME TOGGLE --- */
.theme-toggle {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 100;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: var(--text-main);
    backdrop-filter: blur(12px);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
}

/* --- GLASS CARD --- */
.glass-card {
    position: relative;
    z-index: 10;
    width: 360px;
    padding: 40px 30px;
    background: var(--glass-bg);
    border-radius: 28px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

body.light-theme .glass-card {
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

/* --- ICON AREA --- */
.icon-area {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--icon-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    color: var(--text-main);
    transition: all 0.4s ease;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.icon-area svg {
    width: 32px;
    height: 32px;
    opacity: 0.9;
}

/* --- HEADINGS --- */
h2 {
    margin: 0 0 30px 0;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* --- PIN DOTS --- */
.pin-display {
    display: flex;
    gap: 15px;
    margin-bottom: 35px;
    height: 20px;
    align-items: center;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    background: transparent;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.5;
}

.dot.filled {
    background: var(--accent);
    border-color: var(--accent);
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent);
}

body.light-theme .dot.filled {
    box-shadow: none;
}

.dot.error {
    background: var(--error);
    border-color: var(--error);
    opacity: 1;
}

.dot.success {
    background: var(--success);
    border-color: var(--success);
    opacity: 1;
    transform: scale(1.2);
}

/* --- KEYPAD & CHANGE PIN BUTTONS (UPGRADED STYLE) --- */
.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    justify-items: center;
}

.key,
.change-pass-section .key-submit {
    width: 80px;
    height: 60px;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    color: var(--text-main);
    cursor: pointer;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.4), -5px -5px 15px rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
    backdrop-filter: blur(6px);
}

.key:hover,
.change-pass-section .key-submit:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    transform: scale(1.08) translateY(-2px);
    box-shadow: 6px 6px 20px rgba(0, 0, 0, 0.5), -6px -6px 20px rgba(255, 255, 255, 0.15);
}

.key:active,
.change-pass-section .key-submit:active {
    transform: scale(0.95);
    box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.4), inset -3px -3px 8px rgba(255, 255, 255, 0.1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.key:active span,
.change-pass-section .key-submit:active span {
    text-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent);
}

/* --- STATUS MESSAGE --- */
.status-msg {
    margin-top: 25px;
    min-height: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* --- ANIMATIONS --- */
.shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-muted);
    border-top: 2px solid transparent;
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.locked-out {
    opacity: 0.6;
    pointer-events: none;
    filter: grayscale(0.8);
}

@keyframes popSuccess {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes zoomOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.glass-card.success-animation {
    animation: zoomOut 0.6s ease forwards;
}


/* --- CHANGE PASSWORD SECTION --- */
.change-pass-section {
    margin-top: 20px;
    width: 50%;
    height: 50px;
    display: flex;
    justify-content: center;
    /* horizontal center */
    align-items: center;
    /* vertical center */
    font-size: 1rem;
    gap: 10px;
    
}
.change-pass-section button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background-color: #4a90e2;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.change-pass-section button:hover {
    background-color: #357ab8;
}
