/* Styles for the Wallet Modal - Adopting new header style */
:root {
    --wallet-primary-font: 'Roboto Mono', monospace;
    --wallet-accent-font: 'Press Start 2P', cursive;
    --wallet-glow-color: #00FFDC;
    --wallet-text-primary: #E0F0FF;
    --wallet-text-secondary: #A0C0E0;
}

.wallet-modal {
    position: fixed;
    z-index: 1001; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85); /* Match datamining: Darker overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s; 
    backdrop-filter: blur(6px); /* Match datamining: Stronger blur */
}

.wallet-modal.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease;
}

.wallet-modal-content {
    background: linear-gradient(145deg, rgba(10, 25, 40, 0.97), rgba(20, 35, 55, 0.97)); /* Match datamining: Darker, techy gradient */
    margin: auto;
    padding: 0; 
    border: 1px solid rgba(0, 255, 220, 0.6); /* Match datamining: Cyan/Turquoise border */
    border-radius: 15px; 
    width: 90%;
    max-width: 420px; 
    box-shadow: 0 10px 50px rgba(0, 255, 220, 0.7), 0 0 20px rgba(0,0,0,0.4); /* Match datamining: Stronger glow */
    color: var(--wallet-text-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    font-family: var(--wallet-primary-font);
}

/* Header styles for wallet modal - mirrored from profile modal */
.wallet-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px; /* Match datamining */
    background-color: rgba(0,0,0,0.3); /* Match datamining */
    border-bottom: 1px solid rgba(0, 255, 220, 0.4); /* Match datamining */
}

.wallet-modal-header h3 {
    font-family: var(--wallet-accent-font);
    color: var(--wallet-glow-color);
    margin: 0;
    font-size: 1.4em; /* Adjusted for Press Start 2P */
    font-weight: normal;
    text-shadow: 0 0 6px rgba(0, 255, 220, 0.8);
}

/* Close button styles for wallet modal - mirrored from profile modal */
.wallet-modal-close-button {
    background: none;
    border: none;
    color: var(--wallet-text-secondary);
    font-size: 2.2em; /* Adjusted from datamining */
    font-weight: bold;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.wallet-modal-close-button:hover {
    color: var(--wallet-glow-color);
    transform: scale(1.1);
}

/* Body styles for wallet modal to contain the existing layout */
.wallet-modal-body {
    padding: 20px 25px 25px; 
    display: flex;
    flex-direction: column;
    gap: 18px; 
    max-height: 70vh; /* Added from datamining for consistency */
    overflow-y: auto; /* Added from datamining for consistency */
    font-size: 0.9rem;
}

/* Custom scrollbar for modal body (Webkit browsers) - from datamining */
.wallet-modal-body::-webkit-scrollbar {
    width: 8px;
}
.wallet-modal-body::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}
.wallet-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 220, 0.5); /* Accent color */
    border-radius: 4px;
}
.wallet-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 220, 0.8); /* Accent color hover */
}


.wallet-modal-address {
    font-family: var(--wallet-primary-font); /* Ensures Roboto Mono */
    background-color: rgba(0,0,0,0.3);
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    font-size: 0.85em; /* Adjusted */
    word-break: break-all;
    color: var(--wallet-text-secondary);
    border: 1px solid rgba(0, 255, 220, 0.2);
}

.wallet-modal-balance-section {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 255, 220, 0.25); /* New accent, slightly more visible dash */
}
.wallet-modal-balance-section:last-of-type {
    border-bottom: none;
}

.wallet-modal-balance-section p {
    margin: 5px 0;
    font-size: 0.95em; /* Adjusted */
    display: flex;
    justify-content: space-between;
    color: var(--wallet-text-primary);
}

.wallet-modal-balance-section span {
    font-weight: bold; /* Roboto Mono bold should be fine */
    color: var(--wallet-glow-color);
}

.wallet-modal-deposited-prism {
    text-align: center;
    font-size: 1.1em; /* Adjusted */
    color: var(--wallet-text-primary); 
    padding: 12px 15px; 
    background: linear-gradient(135deg, rgba(0, 255, 220, 0.25) 0%, rgba(0, 162, 255, 0.25) 100%); /* Adjusted gradient with new accent */
    border: 1px solid rgba(0, 255, 220, 0.5); /* New accent */
    border-radius: 8px; 
    font-weight: 500; /* Roboto Mono medium weight */
    letter-spacing: 0.5px; 
    text-shadow: 0 0 8px rgba(0, 255, 220, 0.7); /* New accent */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 0 10px rgba(0, 255, 220, 0.4) inset; /* New accent */
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}


.wallet-modal-actions {
    display: flex;
    flex-direction: column; 
    gap: 20px; 
    margin-top: 20px;
    margin-bottom: 20px; 
}

.wallet-action-group {
    display: flex;
    align-items: center;
    gap: 10px; 
}

.wallet-input {
    flex-grow: 1; 
    padding: 12px 15px;
    font-family: var(--wallet-primary-font);
    font-size: 0.9em; /* Adjusted */
    background-color: rgba(0, 0, 0, 0.4); /* Darker input background */
    border: 1px solid rgba(0, 255, 220, 0.5); /* New accent */
    border-radius: 5px;
    color: var(--wallet-text-primary);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.wallet-input::placeholder {
    color: var(--wallet-text-secondary); /* Use variable */
    opacity: 0.7;
}

.wallet-input:focus {
    border-color: #00FFDC; /* New accent */
    box-shadow: 0 0 10px rgba(0, 255, 220, 0.6); /* New accent */
}


.wallet-input[type=number]::-webkit-inner-spin-button,
.wallet-input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.wallet-input[type=number] {
    -moz-appearance: textfield; 
}

.wallet-button {
    background-color: transparent; 
    border: 2px solid #00FFDC; /* New accent for default buttons */
    color: #00FFDC; /* New accent for default buttons */
    padding: 12px 15px; 
    font-family: var(--wallet-accent-font); /* Accent font for buttons */
    font-size: 0.8em; /* Adjusted for Press Start 2P */
    font-weight: normal;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    border-radius: 99px;
    text-align: center;
    min-width: 120px; 
    box-sizing: border-box; 
    letter-spacing: 0.5px; /* Optional: Adjust spacing for Press Start 2P */
}

.wallet-button:hover {
    background-color: #00FFDC; /* New accent */
    color: #0A1E32; 
}

.wallet-button.disconnect {
    border-color: #FF8080; /* Softer red for disconnect, harmonizes better */
    color: #FF8080;
    background-color: transparent; 
}

.wallet-button.disconnect:hover {
    background-color: #FF8080;
    color: #0A1E32; 
}

.wallet-modal-footer-actions {
    display: flex;
    justify-content: space-between; 
    gap: 15px; 
    margin-top: 25px; 
    border-top: 1px solid rgba(0, 255, 220, 0.25); /* New accent, slightly more visible dash */
    padding-top: 20px; 
}

.wallet-modal-footer-actions .wallet-button,
.wallet-modal-footer-actions .tutorial-button { /* Assuming tutorial button might exist here */
    flex-grow: 1; 
}

.wallet-action-group .wallet-button {
    min-width: 130px; 
    flex-shrink: 0; 
}


#wallet-deposit-button {
    border: 2px solid #00FFDC; /* New accent */
    color: #00FFDC; /* New accent */
    background-color: transparent; 
}

#wallet-deposit-button:hover {
    background-color: #00FFDC; /* New accent */
    color: #0A1E32; 
}


@media (max-width: 480px) {
    .wallet-modal-content {
        max-width: 95%;
        margin: 15px auto; 
        /* transform: scale(0.9); Reverted from datamining as wallet modal didn't use this */
    }

    .wallet-modal-body {
        padding: 15px 20px 20px; 
        gap: 12px; 
        font-size: 0.85rem;
    }

    .wallet-modal-address {
        padding: 6px 10px; 
        font-size: 0.8em; 
    }

    .wallet-modal-balance-section {
        padding: 8px 0; 
    }
    .wallet-modal-balance-section p {
        font-size: 0.9em; 
        margin: 3px 0; 
    }

    .wallet-modal-deposited-prism {
        font-size: 1em;
        padding: 10px 12px; 
    }

    .wallet-modal-actions {
        gap: 15px; 
        margin-top: 15px;
        margin-bottom: 15px;
    }

    .wallet-action-group {
        flex-direction: column; 
        align-items: stretch; 
    }
    .wallet-action-group .wallet-input,
    .wallet-action-group .wallet-button {
        font-size: 0.85em; 
        padding: 10px 12px; 
    }

    .wallet-modal-footer-actions {
        margin-top: 20px; 
        padding-top: 15px; 
        gap: 10px;
    }
    .wallet-modal-footer-actions .wallet-button {
        font-size: 0.75em; /* Adjusted */
        padding: 10px 5px; 
    }

    .wallet-input,
    .wallet-action-group .wallet-button {
        width: 100%; 
        box-sizing: border-box; 
    }

    .wallet-action-group .wallet-button {
        min-width: auto; 
    }

    .wallet-modal-header h3 {
        font-size: 1.2em; /* Adjusted */
    }
} 

.wallet-cooldown-notice {
    text-align: center;
    padding: 18px 15px;
    font-size: 0.95em;
    color: #FFD700; /* Gold/Amber color for notice */
    background-color: rgba(255, 215, 0, 0.1); /* Faint background */
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    font-family: var(--wallet-primary-font);
    letter-spacing: 0.5px;
    margin-top: 10px;
    line-height: 1.4;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.wallet-cooldown-notice strong {
    font-family: var(--wallet-accent-font);
    font-size: 1.1em;
    color: #FFFFFF;
    display: block;
    margin-bottom: 8px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.7);
} 