* {
    box-sizing: border-box;
}

.gateway, .ibl-badge {
    pointer-events: auto;
}

body {
    font-family: "Inter", sans-serif;
    background: #dddddd;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    overflow: hidden;
}

.ambient-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    background: #dddddd;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(203, 213, 225, 0.2) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(226, 232, 240, 0.25) 0%, transparent 40%);
}

.ambient-bg::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    backdrop-filter: blur(80px);
    -webkit-backdrop-filter: blur(80px);
}

.gateway {
    position: relative;
    z-index: 10;
    width: 520px;
    max-width: 92%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(25px);
    border-radius: 30px;
    padding: 2.2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.crest {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
}

.crest-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crest-icon {
    font-size: 1.6rem;
}

.crest-text {
    font-weight: 700;
    letter-spacing: -0.01em;
    font-size: 1.1rem;
    color: #0f172a;
}

.restricted-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 1.2px;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.input-group {
    margin-bottom: 1.2rem;
}

.input-group label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #475569;
}

.field {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    font-size: 1rem;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.field:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.action-area {
    margin-top: 2rem;
}

.auth-btn {
    width: 100%;
    background: #0f172a;
    border: 1px solid #0f172a;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn:hover {
    background: #1e293b;
    transform: translateY(-1px);
}

.tunnel-loader {
    display: none;
    margin-top: 1.5rem;
}

.tunnel-loader.active {
    display: block;
}

.tunnel-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #64748b;
    margin-bottom: 8px;
    text-align: center;
}

/* loading tunnel — elegant, white/light */
        .tunnel-loader {
            display: none;
            margin-top: 2.2rem;
            text-align: center;
        }

        .tunnel-loader.active {
            display: block;
        }

        .tunnel-visual {
            display: flex;
            justify-content: center;
            gap: 14px;
            margin-bottom: 1.2rem;
        }

        .tunnel-ring {
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: transparent;
            border: 2.5px solid #2563eb;
            box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1);
            animation: pulseTunnel 1.2s infinite ease-in-out alternate;
        }

        .tunnel-ring:nth-child(2) { animation-delay: 0.15s; width: 20px; height: 20px; opacity: 0.85; }
        .tunnel-ring:nth-child(3) { animation-delay: 0.3s; width: 26px; height: 26px; opacity: 0.7; border-color: #3b82f6; }
        .tunnel-ring:nth-child(4) { animation-delay: 0.45s; width: 34px; height: 34px; opacity: 0.5; border-color: #60a5fa; }
        .tunnel-ring:nth-child(5) { animation-delay: 0.6s; width: 42px; height: 42px; opacity: 0.35; border-color: #93c5fd; }

        @keyframes pulseTunnel {
            0% { transform: scale(1); opacity: 0.3; }
            100% { transform: scale(1.5); opacity: 1; }
        }

        .tunnel-text {
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 4px;
            color: #1e293b;
            font-weight: 500;
        }

        .progress-tunnel {
            width: 100%;
            height: 2.5px;
            background: #e2e8f0;
            margin-top: 22px;
            border-radius: 10px;
            overflow: hidden;
        }

        .progress-fill {
            width: 0%;
            height: 100%;
            background: #2563eb;
            transition: width 0.06s linear;
        }


.progress-tunnel {
    width: 100%;
    height: 3px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #d4af37;
    transition: width 0.1s linear;
}

.status-note {
	font-size: 0.75rem;
	margin-top: 1.2rem;
	color: #64748b;
	text-align: right;
	font-weight: 400;
}

.ibl-badge {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 40px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    cursor: pointer;
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ibl-badge:hover {
    width: 124px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.badge-content {
    display: flex;
    align-items: center;
    padding-left: 8px;
}

.badge-icon {
    min-width: 38px;
    height: 38px;
    background: #0f172a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.badge-text {
    margin-left: 14px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ibl-badge:hover .badge-text {
    opacity: 1;
}

@media (max-width: 600px) {
    body {
        align-items: flex-start;
        padding-top: 20px;
    }

    .gateway {
        padding: 1.5rem 1.2rem;
        width: 90%;
        margin-bottom: 120px;
    }

    .ibl-badge {
        /* Force position above browser bars */
        bottom: 110px !important; 
        right: 20px !important;
        position: fixed !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}