/* MexUni - Modals CSS */
/* Modali, form, bottoni, voice recording, preloader */

/* ═══════════════════════════════════════════════════════════════════
   TORTEGA WALLET Modal - Desktop Fix
   ═══════════════════════════════════════════════════════════════════ */
@media (min-width: 769px) {
    #wallet-modal .modal-content {
        max-width: 420px !important;
        max-height: 75vh !important;
        overflow-y: auto !important;
        padding: 25px !important;
    }
    
    #wallet-modal h2 {
        font-size: 1.2rem !important;
        margin-bottom: 12px !important;
    }
    
    #wallet-modal h3 {
        font-size: 0.85rem !important;
        margin-bottom: 8px !important;
    }
    
    #wallet-modal input {
        padding: 10px !important;
        font-size: 0.85rem !important;
    }
    
    #wallet-modal button {
        padding: 10px !important;
        font-size: 0.8rem !important;
    }
    
    #wallet-modal p {
        font-size: 0.75rem !important;
        margin-bottom: 8px !important;
    }
}

/* Scrollbar personalizzata per modale wallet */
#wallet-modal .modal-content::-webkit-scrollbar {
    width: 6px;
}

#wallet-modal .modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

#wallet-modal .modal-content::-webkit-scrollbar-thumb {
    background: #ffd700;
    border-radius: 10px;
}

/* MODAL */
.modal {
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: 0.4s;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: rgba(5, 5, 10, 0.95);
    padding: 40px;
    border: 1px solid #00f2ff;
    width: 450px;
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.2);
    text-align: center;
}

.message-modal .modal-content {
    border-color: #ff00ff;
    box-shadow: 0 0 40px rgba(255, 0, 255, 0.2);
}

.alert-modal .modal-content {
    border: 2px solid #ff003c !important;
    box-shadow: 0 0 50px rgba(255, 0, 60, 0.3) !important;
    width: 400px;
    max-width: 90%;
    z-index: 10001;
}

h2, h3 {
    margin-bottom: 25px;
    color: #00f2ff;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.alert-message {
    font-size: 0.9rem;
    color: #ddd;
    line-height: 1.5;
    letter-spacing: 1px;
}

/* Saved message */
#saved-message {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #ff00ff;
    margin-bottom: 20px;
    text-align: left;
    word-break: break-all;
    font-size: 0.9rem;
    color: #ddd;
    min-height: 80px;
}

/* Textarea */
textarea {
    width: 100%;
    height: 140px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #ff00ff;
    color: #ff00ff;
    font-family: inherit;
    margin-bottom: 15px;
    resize: none;
    outline: none;
}

/* Voice recording */
.voice-recording-container {
    margin-top: 15px;
    text-align: center;
}

.voice-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.voice-record-btn {
    background: transparent;
    border: 2px solid #ff00ff;
    color: #ff00ff;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
}

.voice-record-btn:hover {
    background: #ff00ff;
    color: #000;
    box-shadow: 0 0 20px #ff00ff;
}

.voice-record-btn.recording {
    background: #ff00ff;
    color: #000;
    animation: pulse 1s infinite;
    box-shadow: 0 0 30px #ff00ff;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.voice-icon {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.voice-record-btn.recording .voice-icon {
    transform: scale(1.2);
}

.voice-text {
    font-weight: bold;
}

.voice-timer {
    background: rgba(255, 0, 255, 0.1);
    border: 1px solid #ff00ff;
    color: #ff00ff;
    padding: 8px 15px;
    border-radius: 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    min-width: 60px;
}

.voice-timer span {
    color: #fff;
    font-size: 1.1rem;
}

.voice-preview-container {
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid #00f2ff;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.voice-preview-container audio {
    width: 100%;
    margin-bottom: 10px;
}

.voice-delete-btn {
    background: transparent;
    border: 1px solid #ff003c;
    color: #ff003c;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.voice-delete-btn:hover {
    background: #ff003c;
    color: #000;
}

/* Inputs */
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.3);
    color: white;
    font-family: inherit;
    outline: none;
}

input[type="password"]:focus {
    border-color: #ff00ff;
}

/* Modal actions */
.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

button {
    
    padding: 12px;
    background: transparent;
    border: 1px solid #00f2ff;
    color: #00f2ff;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: 0.3s;
}

#save-message-btn, #unlock-btn {
    border-color: #ff00ff;
    color: #ff00ff;
}

.redeem-btn {
    background: #00ff41;
    color: #000;
    border: 1px solid #00ff41;
    padding: 8px 15px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
    transition: 0.3s;
    text-transform: uppercase;
}

.redeem-btn:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 15px #00ff41;
}

button:hover {
    background: rgba(0, 242, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
}

#save-message-btn:hover {
    background: rgba(255, 0, 255, 0.1);
}

/* Alert buttons */
.alert-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.alert-cancel-btn {
    border-color: #ff003c !important;
    color: #ff003c !important;
}

.alert-confirm-btn {
    border-color: #00ff41 !important;
    color: #00ff41 !important;
}

/* Proxy button */
.proxy-btn {
    background: transparent;
    border: 1px solid #00f2ff;
    color: #00f2ff;
    padding: 12px 25px;
    cursor: pointer;
    margin-top: 10px;
    font-family: inherit;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: 0.3s;
}

.proxy-btn:hover {
    background: rgba(0, 242, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

/* CYBER PRELOADER */
.preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00f2ff;
    font-family: 'Orbitron', sans-serif;
    overflow: hidden;
}

#matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.preloader-content {
    max-width: 500px;
    padding: 30px;
    border: 2px solid #00f2ff;
    background: rgba(5, 5, 10, 0.85);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.3);
    text-align: center;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.preloader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 242, 255, 0.3);
    padding-bottom: 10px;
}

.close-x {
    cursor: pointer;
    font-size: 1.5rem;
    color: #ff00ff;
    transition: 0.3s;
}

.close-x:hover {
    transform: scale(1.2);
    text-shadow: 0 0 10px #ff00ff;
}

.warning-text {
    color: #ff00ff;
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.info-scroll {
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-left: 3px solid #00f2ff;
    margin-bottom: 20px;
}

.info-scroll p {
    margin-bottom: 10px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.critical {
    color: #ff0000;
    font-weight: bold;
    text-shadow: 0 0 5px #ff0000;
}

.counter-container {
    margin-top: 25px;
    font-size: 0.75rem;
    opacity: 0.7;
    letter-spacing: 1px;
}

#preloader-counter {
    color: #ff00ff;
    font-weight: bold;
}