/**
 * WebEngine CMS - Modal System CSS
 * Sistema de Modal para perfis de jogadores e guilds
 * Em conformidade com o tema dark/purple do style.css
 */

.webengine-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

.webengine-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.webengine-modal-container {
    position: relative;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    border: 2px solid #6818ca;
    border-radius: 10px;
    max-width: 90vw;
    max-height: 90vh;
    width: 600px;
    box-shadow: 
        0 20px 60px rgba(104, 24, 202, 0.4),
        0 0 30px rgba(104, 24, 202, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
}

.webengine-modal-header {
    background: rgba(40, 40, 40, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-bottom: 3px solid #6818ca;
    text-align: right;
    position: relative;
}

.webengine-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(104, 24, 202, 0.5), transparent);
}

.webengine-modal-close {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.webengine-modal-close:hover {
    background: #c82333;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

.webengine-modal-content {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
    color: #e0e0e0;
    background: rgba(20, 20, 20, 0.3);
}

.webengine-modal-loading {
    text-align: center;
    padding: 40px 20px;
    color: #e0e0e0;
}

.loading-spinner {
    border: 4px solid rgba(104, 24, 202, 0.2);
    border-top: 4px solid #6818ca;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    box-shadow: 0 0 10px rgba(104, 24, 202, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos específicos para perfis no modal - seguindo o padrão do style.css */
.webengine-modal .profiles_player_card,
.webengine-modal .profiles_guild_card {
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
}

.webengine-modal .profiles_player_table,
.webengine-modal .profiles_guild_card .table {
    width: 100%;
    margin-bottom: 15px;
    background: transparent;
}

.webengine-modal .profiles_player_table td:first-child {
    background: #1a1a1a !important;
    color: #6818ca !important;
    padding: 12px 15px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.webengine-modal .profiles_player_table td {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
    padding: 12px 15px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.webengine-modal .profiles_player_table {
    background: #1a1a1a !important;
}

.webengine-modal .profiles_player_table tr:hover td {
    background: rgba(104, 24, 202, 0.1);
}

.webengine-modal .cname {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    color: #6818ca;
    text-shadow: 0 0 10px rgba(104, 24, 202, 0.5);
    padding: 20px 0;
    font-family: 'PT Sans', sans-serif;
}

.webengine-modal .cclass {
    font-size: 18px;
    text-align: center;
    color: #aaaaaa;
    font-style: italic;
    padding-bottom: 15px;
    font-family: 'PT Sans', sans-serif;
}

.webengine-modal .profiles_player_table_info td:first-child {
    font-weight: bold;
    width: 50%;
    background: rgba(40, 40, 40, 0.7);
    color: #aaaaaa;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.webengine-modal .profiles_player_table_info td:last-child {
    text-align: right;
    color: #9c59ff;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(104, 24, 202, 0.3);
}

.webengine-modal .isonline {
    color: #28a745 !important;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
}

.webengine-modal .isoffline {
    color: #dc3545 !important;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(220, 53, 69, 0.5);
}

.webengine-modal .guild_name {
    font-size: 28px;
    font-weight: bold;
    color: #6818ca;
    display: block;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px rgba(104, 24, 202, 0.5);
    font-family: 'PT Sans', sans-serif;
}

.webengine-modal .guild_logo {
    display: block;
    margin-bottom: 20px;
    text-align: center;
}

.webengine-modal .guild_logo img {
    box-shadow: 0 0 15px rgba(104, 24, 202, 0.3);
    border-radius: 5px;
}

.webengine-modal .guild_members {
    font-size: 20px;
    font-weight: bold;
    color: #aaaaaa;
    display: block;
    margin-bottom: 15px;
    text-align: center;
    font-family: 'PT Sans', sans-serif;
}

.webengine-modal .guild_members_list {
    margin-top: 15px;
}

.webengine-modal .guild_members_list .col-xs-3 {
    margin-bottom: 8px;
    font-size: 14px;
}

.webengine-modal .guild_members_list a {
    color: #9c59ff !important;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.webengine-modal .guild_members_list a:hover {
    color: #6818ca !important;
    background: rgba(104, 24, 202, 0.1);
    text-decoration: underline;
    transform: translateY(-1px);
}

/* Links dentro do modal - seguindo padrão do style.css */
.webengine-modal a {
    color: #9c59ff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.webengine-modal a:hover {
    color: #6818ca;
    text-decoration: underline;
    transform: translateY(-1px);
}

/* Botão de perfil completo - seguindo padrão dos botões do style.css */
.webengine-modal a[style*="background"] {
    background: #6818ca !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 4px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(104, 24, 202, 0.3) !important;
}

.webengine-modal a[style*="background"]:hover {
    background: #5714a8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(104, 24, 202, 0.5) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Tabelas - seguindo padrão do style.css */
.webengine-modal table {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.webengine-modal table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

.webengine-modal table tr:hover td {
    background: rgba(50, 50, 50, 0.7);
}

.webengine-modal table tr:last-child td {
    border-bottom: none;
}

/* Scrollbar customizada - seguindo tema dark */
.webengine-modal-content::-webkit-scrollbar {
    width: 8px;
}

.webengine-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.webengine-modal-content::-webkit-scrollbar-thumb {
    background: #6818ca;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(104, 24, 202, 0.5);
}

.webengine-modal-content::-webkit-scrollbar-thumb:hover {
    background: #8a2be2;
}

/* Responsividade - seguindo padrão do style.css */
@media (max-width: 768px) {
    .webengine-modal-container {
        width: 95vw;
        margin: 10px;
        border-radius: 8px;
    }
    
    .webengine-modal-content {
        padding: 20px 15px;
        max-height: 80vh;
    }
    
    .webengine-modal .cname {
        font-size: 24px;
        padding: 15px 0;
    }
    
    .webengine-modal .guild_name {
        font-size: 24px;
    }
    
    .webengine-modal .profiles_player_table td {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .webengine-modal-container {
        width: 98vw;
        margin: 5px;
    }
    
    .webengine-modal-content {
        padding: 15px 10px;
    }
    
    .webengine-modal .cname {
        font-size: 20px;
        padding: 12px 0;
    }
    
    .webengine-modal .profiles_player_table td {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* Animações - seguindo padrão do style.css */
.webengine-modal {
    animation: fadeIn 0.3s ease-out;
}

.webengine-modal-container {
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Divisores - seguindo padrão do style.css */
.webengine-modal hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(104, 24, 202, 0.5), transparent);
    margin: 20px 0;
}

/* Alertas de erro - seguindo padrão do style.css */
.webengine-modal .alert-danger {
    background: rgba(220, 53, 69, 0.1) !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
    color: #ff6b7a !important;
    border-radius: 5px !important;
    padding: 15px !important;
    margin: 15px 0 !important;
}

/* Efeitos de glassmorphism - seguindo padrão do style.css */
.webengine-modal .profiles_player_card,
.webengine-modal .profiles_guild_card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s ease;
}

.webengine-modal .profiles_player_card:hover,
.webengine-modal .profiles_guild_card:hover {
    box-shadow: 0 8px 32px 0 rgba(104, 24, 202, 0.2);
}

/* Tipografia - usando fonte do style.css */
.webengine-modal {
    font-family: 'PT Sans', sans-serif;
    font-size: 14px;
}

/* Cores específicas para valores numéricos */
.webengine-modal .profiles_player_table_info td:last-child {
    color: #6818ca;
}

/* Efeitos de hover para elementos interativos */
.webengine-modal .profiles_player_table tr:hover {
    background: rgba(104, 24, 202, 0.05);
}

.webengine-modal .guild_members_list .col-xs-3:hover {
    transform: translateY(-1px);
}

/* Estilo para elementos com foco */
.webengine-modal *:focus {
    outline: 2px solid #6818ca;
    outline-offset: 2px;
}
