/* 1980s ATM Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'VT323', monospace;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #00ff00;
    overflow: hidden;
}

.atm-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* ATM Machine Body */
.atm-machine {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 3px solid #444;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
    min-width: 400px;
    max-width: 500px;
}

/* ATM Screen */
.atm-screen {
    background: #000;
    border: 4px solid #333;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.atm-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 255, 0, 0.1) 50%, transparent 100%);
    animation: scanline 3s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #00ff00;
    padding-bottom: 10px;
}

.bank-logo {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 18px;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    letter-spacing: 2px;
}

.time-display {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: #00ff00;
    background: #111;
    padding: 5px 10px;
    border: 1px solid #00ff00;
    border-radius: 5px;
}

.screen-content {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Welcome Screen */
.welcome-screen {
    text-align: center;
}

.welcome-text h1 {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00ff00;
    letter-spacing: 1px;
}

.welcome-text p {
    font-size: 16px;
    margin-bottom: 30px;
    color: #00ff00;
}

.pin-input {
    margin-bottom: 30px;
    position: relative;
}

#pinInput {
    background: #111;
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: 'VT323', monospace;
    font-size: 24px;
    padding: 10px;
    text-align: center;
    width: 200px;
    border-radius: 5px;
    outline: none;
    letter-spacing: 10px;
}

#pinInput:focus {
    box-shadow: 0 0 15px #00ff00;
}

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.pin-dots span {
    width: 15px;
    height: 15px;
    border: 2px solid #00ff00;
    border-radius: 50%;
    background: transparent;
    transition: background 0.3s;
}

.pin-dots span.filled {
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00;
}

/* Account Screen */
.account-screen {
    text-align: center;
}

.account-info h2 {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00ff00;
}

.account-details {
    background: #111;
    border: 2px solid #00ff00;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.account-details p {
    margin-bottom: 10px;
    font-size: 16px;
}

.account-details strong {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

#accountBalance {
    font-size: 24px;
    font-weight: bold;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

/* Error Screen */
.error-screen {
    text-align: center;
}

.error-message h2 {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    margin-bottom: 20px;
    color: #ff0000;
    text-shadow: 0 0 10px #ff0000;
}

.error-message p {
    font-size: 16px;
    margin-bottom: 30px;
    color: #ff0000;
}

/* Button Styling */
.button-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.atm-button {
    background: linear-gradient(145deg, #333, #222);
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: 'VT323', monospace;
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.atm-button:hover {
    background: linear-gradient(145deg, #00ff00, #00cc00);
    color: #000;
    box-shadow: 0 0 15px #00ff00;
    transform: translateY(-2px);
}

.atm-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ATM Keypad */
.atm-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.keypad-row {
    display: contents;
}

.keypad-button {
    background: linear-gradient(145deg, #444, #333);
    border: 2px solid #666;
    color: #fff;
    font-family: 'VT323', monospace;
    font-size: 20px;
    font-weight: bold;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.keypad-button:hover {
    background: linear-gradient(145deg, #00ff00, #00cc00);
    color: #000;
    border-color: #00ff00;
    box-shadow: 0 0 15px #00ff00;
    transform: scale(1.05);
}

.keypad-button:active {
    transform: scale(0.95);
}

/* ATM Card and Receipt Slots */
.card-slot, .receipt-slot {
    position: absolute;
    width: 60px;
    height: 8px;
    background: #111;
    border: 2px solid #333;
    border-radius: 4px;
}

.card-slot {
    top: 20px;
    right: 20px;
}

.receipt-slot {
    bottom: 20px;
    right: 20px;
}

.card-slot-indicator, .receipt-slot-indicator {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #333, #666, #333);
    border-radius: 2px;
    animation: slotGlow 2s ease-in-out infinite alternate;
}

@keyframes slotGlow {
    0% { box-shadow: 0 0 5px #00ff00; }
    100% { box-shadow: 0 0 15px #00ff00; }
}

/* Instructions */
.atm-instructions {
    text-align: center;
    color: #00ff00;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #00ff00;
    max-width: 500px;
}

.atm-instructions p {
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 600px) {
    .atm-machine {
        min-width: 300px;
        padding: 20px;
    }
    
    .bank-logo {
        font-size: 16px;
    }
    
    .welcome-text h1 {
        font-size: 18px;
    }
    
    #pinInput {
        width: 150px;
        font-size: 20px;
    }
    
    .atm-keypad {
        gap: 8px;
    }
    
    .keypad-button {
        padding: 12px;
        font-size: 18px;
    }
}

/* CRT Screen Effect */
.atm-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 0, 0.03) 2px,
        rgba(0, 255, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* Processing Screen */
.processing-screen {
    text-align: center;
}

.processing-screen h2 {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    margin-bottom: 30px;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.loading-dots span {
    width: 20px;
    height: 20px;
    background: #00ff00;
    border-radius: 50%;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingPulse {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(0.8);
        box-shadow: 0 0 5px #00ff00;
    }
    50% { 
        opacity: 1; 
        transform: scale(1.2);
        box-shadow: 0 0 20px #00ff00;
    }
}

/* Glitch Effect */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.glitch {
    animation: glitch 0.3s ease-in-out;
}

.fullscreen-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
    background: linear-gradient(145deg, #333, #222);
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: all 0.2s;
}
.fullscreen-btn:hover {
    background: linear-gradient(145deg, #00ff00, #00cc00);
    color: #000;
    box-shadow: 0 0 15px #00ff00;
}

@media (max-width: 900px) {
    .atm-machine {
        min-width: 90vw;
        max-width: 98vw;
        padding: 10vw 2vw;
    }
    .atm-instructions {
        max-width: 95vw;
        font-size: 16px;
    }
    .atm-screen {
        padding: 4vw 2vw;
    }
    .button-row {
        gap: 8vw;
    }
    .atm-button, .keypad-button {
        font-size: 22px;
        padding: 18px 28px;
    }
    .keypad-button {
        min-width: 60px;
        min-height: 60px;
    }
    #pinInput {
        width: 60vw;
        font-size: 28px;
        padding: 16px;
    }
    .pin-dots span {
        width: 24px;
        height: 24px;
    }
    .account-details {
        font-size: 18px;
        padding: 6vw 2vw;
    }
}

@media (max-width: 600px) {
    .atm-machine {
        min-width: 98vw;
        max-width: 100vw;
        padding: 4vw 1vw;
    }
    .atm-instructions {
        max-width: 99vw;
        font-size: 15px;
    }
    .atm-screen {
        padding: 2vw 1vw;
    }
    .button-row {
        gap: 4vw;
    }
    .atm-button, .keypad-button {
        font-size: 20px;
        padding: 14px 18px;
    }
    .keypad-button {
        min-width: 44px;
        min-height: 44px;
    }
    #pinInput {
        width: 80vw;
        font-size: 22px;
        padding: 10px;
    }
    .pin-dots span {
        width: 18px;
        height: 18px;
    }
    .account-details {
        font-size: 16px;
        padding: 4vw 1vw;
    }
    .fullscreen-btn {
        font-size: 16px;
        padding: 10px 14px;
        top: 8px;
        right: 8px;
    }
}

/* Banking App Screen */
.banking-app-screen {
    text-align: center;
    padding: 20px;
}

.banking-app-header h2 {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    margin-bottom: 20px;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

.user-info {
    background: #111;
    border: 2px solid #00ff00;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: left;
}

.user-info p {
    margin-bottom: 8px;
    font-size: 16px;
}

.transfer-section h3 {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    margin-bottom: 20px;
    color: #00ff00;
}

.transfer-input {
    margin-bottom: 20px;
}

.transfer-input label {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    color: #00ff00;
}

#transferAmount {
    background: #111;
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: 'VT323', monospace;
    font-size: 24px;
    padding: 12px;
    text-align: center;
    width: 200px;
    border-radius: 8px;
    outline: none;
    margin-bottom: 15px;
}

.amount-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 300px;
    margin: 0 auto;
}

.amount-row {
    display: contents;
}

.amount-btn {
    background: linear-gradient(145deg, #444, #333);
    border: 2px solid #666;
    color: #fff;
    font-family: 'VT323', monospace;
    font-size: 18px;
    font-weight: bold;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.amount-btn:hover {
    background: linear-gradient(145deg, #00ff00, #00cc00);
    color: #000;
    border-color: #00ff00;
    box-shadow: 0 0 15px #00ff00;
    transform: scale(1.05);
}

.amount-btn:active {
    transform: scale(0.95);
}

.transfer-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* Face Scan Screen */
.face-scan-screen {
    text-align: center;
    padding: 20px;
}

.scan-container {
    max-width: 400px;
    margin: 0 auto;
}

.camera-frame {
    width: 220px;
    height: 220px;
    border: 4px solid #00ff00;
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
    background: #000;
    overflow: hidden;
    box-shadow: 0 0 20px #00ff00;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cameraFeed {
    position: relative;
    z-index: 1000001 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    background: #000;
    border: none !important;
}

.scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00;
    animation: scanMove 2s linear infinite;
}

.face-detection-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 100px;
    border: 2px solid #00ff00;
    border-radius: 50% / 70%;
    box-shadow: 0 0 15px #00ff00;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { 
        box-shadow: 0 0 15px #00ff00;
        border-color: #00ff00;
    }
    100% { 
        box-shadow: 0 0 25px #00ff00;
        border-color: #00cc00;
    }
}

.face-scan-screen h3 {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    margin-bottom: 15px;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

#scanStatus {
    font-size: 16px;
    margin-bottom: 20px;
    color: #00ff00;
}

.scan-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #111;
    border: 2px solid #00ff00;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #00cc00);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px #00ff00;
}

/* Mobile Responsive for Banking App */
@media (max-width: 900px) {
    .banking-app-header h2 {
        font-size: 18px;
    }
    
    #transferAmount {
        width: 80vw;
        font-size: 20px;
        padding: 15px;
    }
    
    .amount-keypad {
        max-width: 80vw;
        gap: 10px;
    }
    
    .amount-btn {
        padding: 15px;
        font-size: 20px;
    }
    
    .camera-frame {
        width: 60vw;
        height: 45vw;
    }
    
    .camera-lens {
        width: 20vw;
        height: 20vw;
    }
}

@media (max-width: 600px) {
    .banking-app-header h2 {
        font-size: 16px;
    }
    
    #transferAmount {
        width: 90vw;
        font-size: 18px;
        padding: 12px;
    }
    
    .amount-keypad {
        max-width: 90vw;
        gap: 8px;
    }
    
    .amount-btn {
        padding: 12px;
        font-size: 18px;
    }
    
    .camera-frame {
        width: 70vw;
        height: 52vw;
    }
    
    .camera-lens {
        width: 25vw;
        height: 25vw;
    }
}

.verify-button-container {
    margin: 20px 0;
    text-align: center;
}

.verify-button-container .atm-button {
    font-size: 18px;
    padding: 15px 30px;
    background: linear-gradient(145deg, #00ff00, #00cc00);
    color: #000;
    border-color: #00ff00;
    box-shadow: 0 0 15px #00ff00;
    animation: pulse 2s ease-in-out infinite alternate;
}

.verify-button-container .atm-button:hover {
    background: linear-gradient(145deg, #00cc00, #009900);
    transform: scale(1.05);
    box-shadow: 0 0 20px #00ff00;
}

.verify-button-container .atm-button:active {
    transform: scale(0.95);
}

.face-scan-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.face-scan-modal {
    z-index: 1000000 !important;
    background: #181818;
    border: 3px solid #00ff00;
    border-radius: 20px;
    box-shadow: 0 0 40px #00ff00, 0 0 0 8px rgba(0,255,0,0.1);
    padding: 32px 24px 24px 24px;
    max-width: 95vw;
    width: 400px;
    max-height: 95vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 600px) {
    .face-scan-modal {
        width: 98vw;
        padding: 10vw 2vw 2vw 2vw;
    }
}

/* Ensure camera frame fits modal */
.face-scan-modal .camera-frame {
    width: 100%;
    height: 220px;
    margin-bottom: 18px;
}

.green-tick {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 6em;
    color: #00ff00;
    opacity: 0;
    z-index: 1000002;
    pointer-events: none;
    transition: opacity 0.4s, transform 0.4s;
}

.green-tick.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    animation: tick-pop 0.5s cubic-bezier(0.23, 1.12, 0.32, 1) 1;
}

@keyframes tick-pop {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    60% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.green-success {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 1.5em;
    color: #00ff00;
    font-family: 'Orbitron', monospace;
    font-weight: bold;
    letter-spacing: 0.1em;
    opacity: 0;
    z-index: 1000002;
    pointer-events: none;
    transition: opacity 0.4s, transform 0.4s;
    text-shadow: 0 0 20px #00ff00, 0 0 40px #00ff00;
}

.green-success.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    animation: tick-pop 0.5s cubic-bezier(0.23, 1.12, 0.32, 1) 1;
} 