body {
    background: 
        repeating-linear-gradient(
            to bottom,
            rgba(180, 180, 180, 0.226) .5px,
            rgba(133, 133, 133, 0.226) 1px,
            transparent 2px,
            transparent 118px
        ),
        linear-gradient(90deg, #353535 0%, #000000 35%, #000000 70%, #3a3a3a 100%);
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

#passkey-container {
    margin-bottom: 30px;
    margin-top: 30px;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255,255,255,0.07) 0px,
            rgba(255,255,255,0.07) 1px,
            transparent 1px,
            transparent 18px
        ),
        rgba(31, 31, 31, 0.363);
    border: 2px solid #ffffff;
    border-radius: 14px;
    box-shadow: 0 0 24px #d3d3d344;
    padding: 32px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}


#passkey-input,
input[type="password"] {
    padding: 10px 16px;
    border-radius: 8px;
    border: 2px solid #ffffff;
    background: rgba(20, 20, 40, 0.95);
    color: #ffffff; /* dark text for contrast */
    font-size: 1.1em;
    box-shadow: 0 0 8px #fff, 0 0 2px #fff inset;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
}

#passkey-input:focus,
input[type="password"]:focus {
    border: 2px solid #ffffff;
    box-shadow: 0 0 16px #fff, 0 0 4px #fff inset;
}

#unlock-btn {
    padding: 10px 22px;
    border-radius: 8px;
    border: 2px solid #fff;
    background: #fff;
    color: #222;
    font-weight: bold;
    font-size: 1.1em;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 0 10px #fff, 0 0 4px #fff inset;
    text-shadow: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;

}

#unlock-btn:hover, #unlock-btn:focus,
.unlock-btn:hover, .unlock-btn:focus {
    background: #76ebb4;
    color: #000;
    box-shadow: 0 0 20px #fff, 0 0 8px #fff inset;
}

#intel-flexbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 75vw;
    max-width: 1100px;
    margin: 32px auto 0 auto;
    min-height: 200px;
    box-sizing: border-box;
}

/* Make info blocks fill most of the flexbox width but not edge-to-edge */
.info-block {
    background: rgba(0,0,0,0.7);
    border: 1px solid #fff;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    width: 95%;
    max-width: 900px;
    text-align: left;
    font-size: 1.2em;
    word-break: break-word;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
}

.passkey-group {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
}

#loading-bar {
    z-index: 1000;
    box-shadow: 0 0 20px #fff, 0 0 8px #fff inset;
}
#loading-bar-inner {
    width: 0%;
    height: 20px;
    background: #fff;
    border-radius: 8px;
    transition: width 1s linear;
}

/* Matrix canvas background */
#matrix-bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.25;
    font-family: 'Aurebesh', monospace !important;
}

/* Raise content above the canvas */
body > *:not(#matrix-bg-canvas) {
    position: relative;
    z-index: 1;
}

#message-submit-container {
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255,255,255,0.07) 0px,
            rgba(255,255,255,0.07) 1px,
            transparent 1px,
            transparent 18px
        ),
        rgba(37, 37, 37, 0.377);
    border: 2px solid #fff;
    border-radius: 14px;
    box-shadow: 0 0 24px #f5f3f344;
    padding: 24px 24px 16px 24px;
    margin-bottom: 32px;
    margin-top: 32px;
    max-width: 600px;
    width: 95vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#message-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

#new-passkey, #new-message, #new-title {
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #fff;
    background: #222;
    color: #ffffff;
    font-size: 1.1em;
    box-shadow: 0 0 8px #fff, 0 0 2px #fff inset;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
}

#new-message {
    min-height: 60px;
    resize: vertical;
}

#message-form button[type="submit"] {
    padding: 10px 22px;
    border-radius: 8px;
    border: 2px solid #fff;
    background: #00000015;
    color: #ffffff;
    font-weight: bold;
    font-size: 1.1em;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 0 10px #fff, 0 0 4px #fff inset;
    text-shadow: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

#message-form button[type="submit"]:hover, #message-form button[type="submit"]:focus {
    background: #eaeaea;
    color: #000000;
    box-shadow: 0 0 20px #fff, 0 0 8px #fff inset;
}

.styled-code-input {
    margin-bottom: 0;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #fff;
    background: #222;
    color: #ffffff;
    font-size: 1.1em;
    box-shadow: 0 0 8px #fff, 0 0 2px #fff inset;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
    width: 110px;
    text-align: center;
    letter-spacing: 0.2em;
}

.styled-code-input:focus {
    border: 2px solid #fff;
    box-shadow: 0 0 16px #fff, 0 0 4px #fff inset;
}

/* Remove spinner arrows in Firefox */
.styled-code-input[type=number]::-webkit-inner-spin-button,
.styled-code-input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.styled-code-input[type=number] {
    -moz-appearance: textfield;
}

/* Hacking Minigame Styles */
#hack-btn {
    padding: 10px 22px;
    border-radius: 8px;
    border: 2px solid #00ff00;
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    font-weight: bold;
    font-size: 1.1em;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 0 10px #00ff00, 0 0 4px #00ff00 inset;
    text-shadow: 0 0 8px #00ff00;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

#hack-btn:hover {
    background: rgba(0, 255, 0, 0.3);
    box-shadow: 0 0 20px #00ff00, 0 0 8px #00ff00 inset;
}

.hack-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.6) !important;
}

#hack-modal {
    backdrop-filter: blur(5px);
}

#hack-game-container {
    animation: fadeIn 0.5s ease-in;
    position: relative;
    z-index: 2;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Custom up/down arrows */
.styled-code-input-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 38px;
}

.grid-column{
    color: white;
    background: #444;
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 8px;
    font-size: 1.2em;
    cursor: pointer;
    box-shadow: 0 0 10px #fff, 0 0 4px #fff inset;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    width: 80px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#keypad-box {
    margin-left: 10px;
    margin-right: 10px;
    background: rgba(30,30,40,0.95);
    border: 2px solid #fff;
    border-radius: 12px;
    box-shadow: 0 0 10px #fff2;
    padding: 16px 18px 14px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#keypad-box #code-input {
    margin-bottom: 10px;
}

#keypad {
    display: grid;
    grid-template-columns: repeat(3,36px);
    gap: 6px;
    justify-content: center;
}

#show-message-form-btn {
    margin-top: 32px;
    margin-bottom: 12px;
    padding: 10px 24px;
    font-size: 1.1em;
    border-radius: 8px;
    border: 2px solid #fff;
    background: #fff;
    color: #222;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 10px #fff, 0 0 4px #00ffea inset;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

#show-message-form-btn:hover, #show-message-form-btn:focus {
    background: #eaeaea;
    color: #000;
    box-shadow: 0 0 20px #fff, 0 0 8px #fff inset;
}

#new-code-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px;
}

#new-code-group label {
    color: #00FFEA;
    font-size: 1.05em;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

#message-submit-status {
    color: #fff;
    margin-top: 8px;
}

.passkey-flex-row {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Status indicator box styles */
#status-indicator-box {
    max-width: 25%;
    background: rgba(87, 87, 90, 0.92);
    border: 4px solid #fff;
    border-radius: 12px;
    box-shadow: 0 0 16px #fff3;
    padding: 22px 18px 18px 18px;
    display: flex;
    flex-direction: column;
    justify-content: right;
    gap: 18px;
}

.status-row {
    display: flex;
    align-items: center;
    font-size: 1.08em;
    color: #fff;
}

.status-dot {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: #222;
    border: 2px solid #555;
    margin-right: 10px;
    transition: background 0.3s, border 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 4px #000a;
}



.keypad-btn {
    background: #fff;
    color: #222;
    border: 2px solid #fff;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 6px #fff, 0 0 2px #fff inset;
    padding: 8px 0;
    transition: background 0.05s, color 0.05s, box-shadow 0.05s;
    outline: none;
    font-family: 'Aurebesh', monospace !important;

}

.keypad-btn:active {
    background: #0ab121;
    color: #000;
    box-shadow: 0 0 12px #0ab121, 0 0 8px #0ab121 inset;
    border: 2px solid #0ab121;
}

/* Special style for the keypad clear button */
#keypad-clear {
    background: #754848;
    color: #fff;
    border: 2px solid #00000000;
    font-weight: bold;
    box-shadow: 0 0 10px #00000000, 0 0 2px #fff inset;
    transition: background 0.08s, color 0.08s, box-shadow 0.08s;
    font-family: monospace !important;

}

#keypad-clear:active {
    background: #c80000;
    color: #fff;
    box-shadow: 0 0 16px #ff4444, 0 0 4px #fff inset;
    border: 2px solid #ff4444;
    font-family: monospace !important;

}

#format-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.format-btn {
    background: #222;
    color: #fff;
    border: 1.5px solid #fff;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 1em;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border 0.15s;
    outline: none;
}

.format-btn:hover, .format-btn:focus {
    background: #fff;
    color: #222;
    border: 1.5px solid #00FFEA;
}