/* GTA SAMP MBC Crypto RP - Modal Styles */

/* Base Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    animation: modalFadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes modalFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    background: var(--light-crypto);
    margin: 2% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    border: 1px solid var(--border-crypto);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes modalSlideIn {
    0% {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Crypto Modal Specific Styles */
.crypto-modal {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.95), rgba(10, 14, 26, 0.95));
    border: 1px solid var(--primary-crypto);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
}

.crypto-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-crypto), var(--secondary-crypto));
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
}

.crypto-modal .modal-header h3 {
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    margin: 0;
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-crypto);
    background: rgba(26, 31, 46, 0.8);
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-crypto);
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: var(--danger-crypto);
    background: rgba(255, 68, 68, 0.1);
    transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
    padding: 2rem;
    background: rgba(26, 31, 46, 0.6);
}

/* Auth Modal Styles */
.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-crypto);
    background: rgba(10, 14, 26, 0.5);
    border-radius: 12px;
    padding: 0.5rem;
}

.auth-tabs .tab-btn {
    background: transparent;
    border: none;
    padding: 0.8rem 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 500;
    flex: 1;
    position: relative;
}

.auth-tabs .tab-btn::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-crypto);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.auth-tabs .tab-btn.active::before,
.auth-tabs .tab-btn:hover::before {
    width: 80%;
}

.auth-tabs .tab-btn.active {
    color: var(--primary-crypto);
    background: rgba(0, 212, 255, 0.1);
}

.auth-tabs .tab-btn:hover {
    color: var(--primary-crypto);
}

/* Auth Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.form-group input,
.form-group select {
    padding: 0.8rem 1rem;
    background: var(--darker-crypto);
    border: 1px solid var(--border-crypto);
    border-radius: 8px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-crypto);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: rgba(0, 212, 255, 0.05);
}

.form-group input:focus + label,
.form-group select:focus + label {
    color: var(--primary-crypto);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.forgot-link {
    color: var(--primary-crypto);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--secondary-crypto);
    text-decoration: underline;
}

/* Admin Modal Styles */
.admin-modal {
    z-index: 3000;
}

.admin-content {
    max-width: 1200px;
    width: 95%;
    max-height: 95vh;
}

.admin-content .modal-header {
    background: linear-gradient(135deg, var(--warning-crypto), #ff6600);
    border-bottom: none;
}

.admin-content .modal-header h3 {
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: rgba(10, 14, 26, 0.5);
    border-radius: 12px;
    padding: 0.5rem;
}

.admin-tabs .tab-btn {
    background: var(--darker-crypto);
    border: 1px solid var(--border-crypto);
    padding: 0.8rem 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-tabs .tab-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary-crypto);
    color: var(--primary-crypto);
}

.admin-tabs .tab-btn.active {
    background: var(--gradient-crypto);
    color: var(--text-primary);
    border-color: var(--primary-crypto);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

/* Admin Content Area */
.admin-content-area {
    min-height: 400px;
    background: var(--darker-crypto);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-crypto);
}

/* Admin Sub-tabs */
.admin-sub-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-crypto);
    padding-bottom: 1rem;
}

.admin-sub-tabs .sub-tab-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    font-size: 0.9rem;
}

.admin-sub-tabs .sub-tab-btn.active,
.admin-sub-tabs .sub-tab-btn:hover {
    color: var(--primary-crypto);
    border-bottom-color: var(--primary-crypto);
}

/* Admin Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--light-crypto);
    border-radius: 8px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-crypto);
}

.admin-table th {
    background: var(--darker-crypto);
    color: var(--primary-crypto);
    font-weight: 600;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
}

.admin-table tr:hover {
    background: rgba(0, 212, 255, 0.05);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* Admin Forms */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Admin Stats Cards */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: var(--light-crypto);
    border: 1px solid var(--border-crypto);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.admin-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-crypto);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

.admin-stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-crypto);
    margin-bottom: 0.5rem;
}

.admin-stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Admin Action Buttons */
.admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.admin-btn-primary {
    background: var(--gradient-crypto);
    color: var(--text-primary);
}

.admin-btn-success {
    background: var(--gradient-success);
    color: var(--text-primary);
}

.admin-btn-danger {
    background: var(--gradient-danger);
    color: var(--text-primary);
}

.admin-btn-warning {
    background: linear-gradient(135deg, var(--warning-crypto), #ff6600);
    color: var(--text-primary);
}

.admin-btn-secondary {
    background: var(--light-crypto);
    color: var(--text-primary);
    border: 1px solid var(--border-crypto);
}

.admin-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Loading States */
.modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    flex-direction: column;
    gap: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-crypto);
    border-top: 3px solid var(--primary-crypto);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Error States */
.modal-error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--danger-crypto);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: var(--danger-crypto);
    text-align: center;
}

/* Success States */
.modal-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--success-crypto);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: var(--success-crypto);
    text-align: center;
}

/* Search and Filter */
.admin-search {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem;
    background: var(--darker-crypto);
    border: 1px solid var(--border-crypto);
    border-radius: 8px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-crypto);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.filter-select {
    padding: 0.8rem;
    background: var(--darker-crypto);
    border: 1px solid var(--border-crypto);
    border-radius: 8px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-crypto);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: var(--light-crypto);
    border: 1px solid var(--border-crypto);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: var(--primary-crypto);
    border-color: var(--primary-crypto);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--darker-crypto);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    border: 1px solid var(--border-crypto);
}

.tooltip:hover::after {
    opacity: 1;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 1% auto;
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .admin-tabs .tab-btn {
        justify-content: center;
    }
    
    .admin-form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-search {
        flex-direction: column;
    }
    
    .search-input {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .crypto-modal .modal-header {
        border-radius: 0;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .auth-tabs {
        flex-direction: column;
    }
    
    .auth-tabs .tab-btn {
        text-align: center;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .admin-btn {
        justify-content: center;
    }
}

/* Modal Animations for Different Types */
.modal.fade-in {
    animation: modalFadeIn 0.3s ease;
}

.modal.slide-up {
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal.scale-in {
    animation: modalScaleIn 0.3s ease;
}

@keyframes modalScaleIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal Backdrop Blur */
.modal.backdrop-blur::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: -1;
}

/* Modal Overlay Patterns */
.modal.pattern-overlay .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, transparent 25%, rgba(0, 212, 255, 0.03) 25%, rgba(0, 212, 255, 0.03) 50%, transparent 50%, transparent 75%, rgba(0, 212, 255, 0.03) 75%);
    background-size: 20px 20px;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

.modal.pattern-overlay .modal-header,
.modal.pattern-overlay .modal-body {
    position: relative;
    z-index: 1;
}

/* Focus Management */
.modal:focus-within {
    outline: 2px solid var(--primary-crypto);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .modal-content {
        border: 2px solid var(--text-primary);
    }
    
    .modal-header {
        border-bottom: 2px solid var(--text-primary);
    }
    
    .close-btn {
        border: 1px solid var(--text-primary);
    }
}
