/* Custom Text Selection Highlight */
::selection { background: #00ff41; color: #000; }

body { 
    background: #0a0a0a; 
    color: #00ff41; 
    font-family: 'Courier New', monospace; 
    display: flex; 
    flex-direction: column; /* Stacks the terminal and dropdown vertically */
    justify-content: center; 
    align-items: center; 
    min-height: 100vh; /* THE FIX: Allows scrolling on small phones */
    margin: 0; 
    padding: 20px 0; /* Gives a little breathing room on the top/bottom edges */
    box-sizing: border-box;
}

.terminal {
    background: #050505;
    border: 2px solid #333;
    border-radius: 5px;
    padding: 20px;
    
    /* Desktop limit */
    max-width: 800px; 
    
    /* Ensures it shrinks nicely on smaller screens */
    width: 95%; 
    margin: 0 auto; /* Removed the top/bottom margin since body handles it now */
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

/* Input Styles & Focus States */
input { 
    background: #000; 
    border: 1px solid #00ff41; 
    color: #00ff41; 
    padding: 10px; 
    width: 100%; 
    box-sizing: border-box; 
    margin-top: 5px; 
    font-family: 'Courier New', monospace;
    transition: box-shadow 0.2s ease;
}

/* Kills the default browser outline and replaces it with a green terminal glow */
input:focus {
    outline: none;
    box-shadow: 0 0 16px #00ff40;
}

/* Button Animations */
button { 
    border: none; 
    padding: 15px; 
    font-weight: bold; 
    cursor: pointer; 
    width: 100%; 
    font-family: 'Courier New', monospace; 
    font-size: 1rem;
    transition: background 0.2s ease, transform 0.1s ease;
}

button:active {
    transform: scale(0.98); /* Makes the button visually "click" down */
}

.byte-counter { font-size: 0.8rem; margin-top: 5px; text-align: right; color: #00ff41; }
.status-bar { margin-bottom: 15px; }
.input-section { margin-bottom: 15px; }

/* Layout Styles */
.nonce-section { display: flex; gap: 20px; margin-bottom: 20px; }
.nonce-box { flex: 1; }
.button-group { display: flex; gap: 10px; }

.btn-crank { background: #ffaa00; color: #000; }
.btn-crank:hover { background: #cc8800; }

.btn-auto { background: #00ff41; color: #000; }
.btn-auto:hover { background: #00cc33; }

.stats { margin-top: 20px; text-align: center; }

/* Mobile Responsiveness */
@media (max-width: 500px) {
    .nonce-section { flex-direction: column; gap: 10px; }
    .button-group { flex-direction: column; gap: 10px; }
    .terminal { padding: 1.5rem; width: 90%; }
}

/* Dropdown Styles (CPU Threads) */
select {
    background: #000;
    border: 1px solid #00ff41;
    color: #00ff41;
    padding: 10px;
    width: 100%;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
}

select:focus { 
    outline: none; 
    box-shadow: 0 0 15px #00ff41; 
}

/* Hash Comparison Board */
.hash-comparison {
    background: #0a0a0a;
    border: 1px solid #333;
    padding: 20px 15px;
    
    /* THE FLUID LOCK */
    display: block;      /* Overrides any flexbox crushing from the parent */
    width: 100%;         /* Forces it to expand to match your input fields */
    min-height: 100px;   /* Prevents vertical jumping */
    
    margin: 0 auto 20px auto;
    box-sizing: border-box; 
    
    text-align: center;
    border-radius: 4px;
}

.hash-row {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center; /* perfectly centers the flexbox children */
}

.hash-row:last-child {
    margin-bottom: 0;
}

.hash-label {
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 6px;
    font-weight: bold;
    letter-spacing: 1px;
}

.hash-value {
    color: #00ff41;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    word-break: break-all; 
    line-height: 1.4;
    letter-spacing: 1px; 
}

/* The Result String - Now Glowing Green */
#hash-display {
    color: #00ff41; 
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.6); /* Radioactive green glow */
    font-weight: bold; /* Thickens the result so it commands attention */
}