/* ==========================================================================
   PORTAL MAHASISWA - INTERACTIVE PULL-CORD LAMP LOGIN STYLES
   Project: dosensiber.my.id
   ========================================================================== */

:root {
    --lamp-bg-dark: #121417;
    --lamp-bg-light: #181b20;
    --lamp-gold: #e9bf62;
    --lamp-gold-glow: rgba(233, 191, 98, 0.45);
    --lamp-glass: rgba(255, 255, 255, 0.07);
    --lamp-glass-border: rgba(255, 255, 255, 0.12);
}

/* Anti-copy & selection lock for lamp modal */
.lamp-modal-root,
.lamp-modal-root * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.lamp-modal-root input {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Fullscreen Modal Overlay */
.lamp-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    background: var(--lamp-bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.lamp-overlay.light-on {
    background: var(--lamp-bg-light);
}

/* Ambient Radial Glow */
.lamp-stage {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 40px 20px;
    background: radial-gradient(circle at 50% 45%, rgba(216, 172, 77, 0.05), transparent 45%);
}

.lamp-stage::before {
    content: "";
    position: absolute;
    width: 1000px;
    height: 900px;
    left: 45%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(230, 184, 106, 0.28) 0%,
        rgba(216, 172, 77, 0.16) 35%,
        rgba(216, 172, 77, 0.05) 55%,
        transparent 75%
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.lamp-overlay.light-on .lamp-stage::before {
    opacity: 1;
}

/* ==========================================================================
   LAMP COMPONENT
   ========================================================================== */
.lamp-area {
    position: relative;
    width: 280px;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    flex-shrink: 0;
}

.lamp {
    position: relative;
    width: 220px;
    height: 360px;
}

/* Lamp shade */
.lamp-shade {
    position: absolute;
    top: 20px;
    left: 10px;
    width: 190px;
    height: 95px;
    background: #f5f5f5;
    border-radius: 100px 100px 30px 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    z-index: 5;
    transition: box-shadow 0.6s ease, background 0.6s ease;
}

.lamp-overlay.light-on .lamp-shade {
    background: #ffffff;
    box-shadow: 0 15px 50px rgba(255, 220, 130, 0.55);
}

/* Golden light underneath lamp shade */
.lamp-shade::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -20px;
    height: 40px;
    background: #2f2d29;
    border-radius: 50%;
    opacity: 0.4;
    z-index: -1;
    transition: background 0.6s ease, opacity 0.6s ease, box-shadow 0.6s ease;
}

.lamp-overlay.light-on .lamp-shade::after {
    background: #ffea9f;
    opacity: 1;
    box-shadow:
        0 5px 25px rgba(255, 225, 120, 0.95),
        0 15px 50px rgba(255, 200, 90, 0.65);
}

/* Pole */
.lamp-pole {
    position: absolute;
    top: 90px;
    left: 91px;
    width: 25px;
    height: 180px;
    background: #e2e8f0;
    transition: background 0.6s ease;
}

.lamp-overlay.light-on .lamp-pole {
    background: linear-gradient(to bottom, #fff6dd, #e2e8f0);
}

/* Base */
.lamp-base {
    position: absolute;
    left: 45px;
    bottom: 30px;
    width: 115px;
    height: 15px;
    background: #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   PULL STRING & INTERACTION
   ========================================================================== */
.pull-string {
    position: absolute;
    top: 70px;
    left: 125px;
    width: 60px;
    height: 200px;
    cursor: grab;
    z-index: 15;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.pull-string:active {
    cursor: grabbing;
}

body.is-pulling,
body.is-pulling * {
    cursor: grabbing !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.string {
    position: absolute;
    left: 29px;
    top: 0;
    width: 3px;
    height: 115px;
    background: #71717a;
    border-radius: 2px;
}

.pull-handle {
    position: absolute;
    left: 20px;
    top: 110px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff2ad, #e6b86a);
    box-shadow: 0 0 16px rgba(230, 184, 106, 0.6);
    cursor: grab;
    transition: box-shadow 0.2s ease;
}

.pull-handle:hover {
    box-shadow: 0 0 22px rgba(230, 184, 106, 0.85);
}

/* Pull hint prompt */
.pull-hint {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 11px;
    font-weight: 700;
    color: #e6b86a;
    background: rgba(230, 184, 106, 0.12);
    border: 1px solid rgba(230, 184, 106, 0.25);
    padding: 4px 12px;
    border-radius: 9999px;
    letter-spacing: 0.04em;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
    animation: hintPulse 2s infinite ease-in-out;
}

.lamp-overlay.light-on .pull-hint {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

/* ==========================================================================
   LOGIN FORM CONTAINER (GLASSMORPHISM)
   ========================================================================== */
.login-wrapper {
    position: relative;
    width: 380px;
    max-width: 100%;
    z-index: 25;
    flex-shrink: 0;
}

.lamp-login-card {
    padding: 34px 30px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.5);

    /* Default state when light is OFF */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(24px) scale(0.96);
    transition:
        opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.5s;
}

/* Active state when light is ON */
.lamp-login-card.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Form Typography & Elements */
.lamp-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    background: rgba(230, 184, 106, 0.15);
    border: 1px solid rgba(230, 184, 106, 0.3);
    color: #ffd875;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.lamp-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.lamp-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
    margin-bottom: 22px;
}

/* Form Groups */
.lamp-input-group {
    margin-bottom: 18px;
    text-align: left;
}

.lamp-input-group label {
    display: block;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.lamp-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    outline: none;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.lamp-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
}

.lamp-input:focus {
    background: rgba(255, 255, 255, 0.14);
    border-color: #e6b86a;
    box-shadow: 0 0 0 3px rgba(230, 184, 106, 0.25);
}

/* Password wrapper & eye toggle */
.lamp-password-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.lamp-password-wrapper input {
    padding-right: 48px;
}

.lamp-toggle-password {
    position: absolute;
    right: 8px;
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.2s ease, transform 0.15s ease;
}

.lamp-toggle-password:hover {
    color: #ffd875;
}

.lamp-toggle-password:active {
    transform: scale(0.9);
}

/* Submit Button */
.lamp-submit-btn {
    position: relative;
    width: 100%;
    height: 50px;
    margin-top: 8px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(120deg, #e6c873, #fff2ad, #d7ae4d);
    color: #121417;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.03em;
    box-shadow: 0 6px 20px rgba(214, 174, 77, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lamp-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(214, 174, 77, 0.45);
}

.lamp-submit-btn:active {
    transform: translateY(0);
}

/* Close Modal Button */
.lamp-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 50;
    transition: all 0.2s ease;
}

.lamp-close-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    transform: scale(1.08);
}

/* Error banner */
.lamp-error-box {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
    line-height: 1.4;
}

/* Information Hint Box */
.lamp-info-box {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(230, 184, 106, 0.08);
    border: 1px solid rgba(230, 184, 106, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    line-height: 1.45;
    text-align: left;
}

.lamp-info-box strong {
    color: #ffd875;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 860px) {
    .lamp-stage {
        gap: 36px;
        padding: 30px 16px;
    }
    .lamp-area {
        transform: scale(0.85);
    }
    .login-wrapper {
        width: 340px;
    }
}

@media (max-width: 680px) {
    .lamp-stage {
        flex-direction: column;
        gap: 12px;
        padding: 60px 14px 30px;
        min-height: 100vh;
        justify-content: flex-start;
    }
    .lamp-area {
        height: 240px;
        transform: scale(0.68);
        margin-top: -10px;
        margin-bottom: -15px;
    }
    .login-wrapper {
        width: 100%;
        max-width: 340px;
    }
    .lamp-login-card {
        padding: 24px 20px;
        border-radius: 22px;
    }
    .lamp-title {
        font-size: 20px;
    }
    .lamp-close-btn {
        top: 14px;
        right: 14px;
        width: 38px;
        height: 38px;
    }
}
