/* Authentication Screen - Pixel Perfect Match to fastloto365.com */

#auth-screen {
    background: #000000;
    background-image: url('../assets/casino-panorama-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    justify-content: center;
    align-items: center;
    position: relative;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Keypad Device - Chrome/Silver Metallic Calculator matching original exactly */
.keypad-device {
    width: 220px;
    background: linear-gradient(180deg,
        #f0f2f5 0%,
        #e0e4e8 2%,
        #c8ccd2 5%,
        #b0b8c0 10%,
        #98a0a8 15%,
        #889098 25%,
        #788088 40%,
        #687078 55%,
        #586068 70%,
        #485058 85%,
        #384048 100%);
    border-radius: 16px;
    padding: 12px 12px 10px 12px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.7),
        0 8px 16px rgba(0, 0, 0, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        inset 2px 0 0 rgba(255, 255, 255, 0.5),
        inset -2px 0 0 rgba(0, 0, 0, 0.2);
    border: 3px solid;
    border-color: #a0a8b0 #707880 #505860 #808890;
    overflow: visible;
    position: relative;
}

/* Chrome bezel effect */
.keypad-device::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 18px;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(0, 0, 0, 0.2) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Keypad Screen - Green LED Display */
.keypad-screen {
    background: linear-gradient(180deg, #0a2010 0%, #051008 100%);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 10px;
    border: 3px solid;
    border-color: #304030 #253025 #1a201a #2a352a;
    box-shadow:
        inset 0 3px 10px rgba(0, 0, 0, 0.9),
        inset 0 0 20px rgba(0, 0, 0, 0.6),
        0 1px 0 rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
}

/* Screen scanline effect */
.keypad-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
}

.keypad-label {
    color: #20c020;
    font-family: 'Arial', 'Helvetica', sans-serif;
    font-size: 13px;
    text-align: center;
    margin-bottom: 6px;
    text-shadow: 0 0 8px rgba(32, 192, 32, 0.9);
    letter-spacing: 0.5px;
    font-weight: normal;
}

/* LED Display Container */
.keypad-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    background: linear-gradient(180deg, #030a05 0%, #010502 100%);
    border-radius: 3px;
    padding: 4px 6px;
    border: 1px solid #0a1510;
}

/* Code Segments - LED Style with 88 ghost pattern */
.code-segment {
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    color: #082010;
    background: transparent;
    border: none;
    margin: 0 1px;
    position: relative;
}

/* Ghost 88 pattern for empty segments */
.code-segment::after {
    content: '88';
    color: #0a2812;
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    text-shadow: 0 0 2px rgba(10, 40, 18, 0.5);
}

.code-segment.filled {
    color: #20d820;
    text-shadow: 0 0 8px rgba(32, 216, 32, 1), 0 0 4px rgba(32, 216, 32, 0.8);
}

.code-segment.filled::after {
    display: none;
}

.code-segment:not(:empty)::after {
    display: none;
}

/* Separators between segments (dashes) */
.code-separator {
    color: #0a2812;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    margin: 0 1px;
    text-shadow: none;
}

.code-separator.active {
    color: #20d820;
    text-shadow: 0 0 6px rgba(32, 216, 32, 0.9);
}

.code-segment.active {
    color: #20d820;
    text-shadow: 0 0 10px rgba(32, 216, 32, 1);
}

/* Keypad Buttons Grid */
.keypad-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

/* Base Button Style - 3D Blue-Gray matching original exactly */
.keypad-btn {
    height: 48px;
    background: linear-gradient(180deg,
        #c8d4e0 0%,
        #b8c4d0 5%,
        #a8b4c0 12%,
        #98a4b0 22%,
        #8894a0 35%,
        #788490 50%,
        #687480 65%,
        #586470 80%,
        #485460 92%,
        #404c58 100%);
    border: none;
    border-radius: 8px;
    font-family: 'Arial', 'Helvetica Neue', sans-serif;
    font-size: 28px;
    font-weight: bold;
    color: #2a3a4a;
    cursor: pointer;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5),
        0 -1px 0 rgba(0, 0, 0, 0.1);
    box-shadow:
        0 5px 0 #2a3a50,
        0 7px 4px rgba(0, 0, 0, 0.4),
        inset 0 2px 1px rgba(255, 255, 255, 0.6),
        inset 0 -1px 1px rgba(0, 0, 0, 0.15),
        inset 1px 0 1px rgba(255, 255, 255, 0.3),
        inset -1px 0 1px rgba(0, 0, 0, 0.08);
    transition: all 0.05s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Button highlight reflection */
.keypad-btn::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 3px;
    right: 3px;
    height: 40%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.15) 40%,
        transparent 100%);
    border-radius: 6px 6px 50% 50%;
    pointer-events: none;
}

.keypad-btn:hover {
    background: linear-gradient(180deg,
        #d8e4f0 0%,
        #c8d4e0 5%,
        #b8c4d0 12%,
        #a8b4c0 22%,
        #98a4b0 35%,
        #8894a0 50%,
        #788490 65%,
        #687480 80%,
        #586470 92%,
        #485460 100%);
}

.keypad-btn:active,
.keypad-btn.btn-press {
    transform: translateY(4px);
    box-shadow:
        0 1px 0 #2a3a50,
        0 2px 2px rgba(0, 0, 0, 0.25),
        inset 0 2px 1px rgba(255, 255, 255, 0.6),
        inset 0 -1px 1px rgba(0, 0, 0, 0.15);
}

/* Back Button - Red Arrow */
.keypad-back {
    background: linear-gradient(180deg,
        #c8d4e0 0%,
        #b8c4d0 5%,
        #a8b4c0 12%,
        #98a4b0 22%,
        #8894a0 35%,
        #788490 50%,
        #687480 65%,
        #586470 80%,
        #485460 92%,
        #404c58 100%);
}

.keypad-back .back-arrow {
    color: #c01818;
    font-size: 26px;
    font-weight: bold;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4),
        0 -1px 0 rgba(0, 0, 0, 0.15);
}

/* OK Button - Green Text */
.keypad-ok {
    background: linear-gradient(180deg,
        #c8d4e0 0%,
        #b8c4d0 5%,
        #a8b4c0 12%,
        #98a4b0 22%,
        #8894a0 35%,
        #788490 50%,
        #687480 65%,
        #586470 80%,
        #485460 92%,
        #404c58 100%);
    font-size: 20px;
    color: #188828;
    font-weight: bold;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5),
        0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Error Animation */
.keypad-device.error {
    animation: shake 0.4s ease-in-out;
}

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

.keypad-device.error .keypad-screen {
    background: linear-gradient(180deg, #2a0808 0%, #150404 100%);
}

.keypad-device.error .code-segment {
    color: #ff3030;
    text-shadow: 0 0 8px rgba(255, 48, 48, 0.9);
}

.keypad-device.error .code-segment::after {
    color: #300808;
}

.keypad-device.error .code-separator {
    color: #400808;
}

.keypad-device.error .keypad-label {
    color: #ff3030;
    text-shadow: 0 0 8px rgba(255, 48, 48, 0.8);
}

/* Success Animation */
.keypad-device.success .code-segment {
    color: #20d820;
    text-shadow: 0 0 12px rgba(32, 216, 32, 1);
    animation: success-pulse 0.25s ease-in-out 3;
}

.keypad-device.success .code-separator {
    color: #20d820;
    text-shadow: 0 0 10px rgba(32, 216, 32, 0.9);
}

@keyframes success-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Fullscreen Button on Auth Screen */
#auth-screen .fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(60, 70, 80, 0.85);
    border: 2px solid rgba(120, 140, 160, 0.7);
    border-radius: 5px;
    color: rgba(200, 215, 230, 0.95);
    font-size: 16px;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

#auth-screen .fullscreen-btn:hover {
    background: rgba(70, 85, 100, 0.9);
    border-color: rgba(140, 165, 190, 0.85);
}

/* Responsive */
@media (max-width: 400px) {
    .keypad-device {
        width: 200px;
        padding: 10px;
    }

    .keypad-btn {
        height: 42px;
        font-size: 24px;
    }

    .code-segment {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .code-segment::after {
        font-size: 12px;
    }

    .keypad-label {
        font-size: 11px;
    }
}

@media (max-height: 500px) {
    .keypad-device {
        transform: scale(0.85);
    }
}
