/* ==========================================
   MARRALHINHA SPA - PROFILE STYLES
   Layout responsivo Desktop/Mobile
   ========================================== */

.profile-container {
    min-height: 100vh;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

.profile-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.profile-title {
    margin: 0;
    font-size: 1.3em;
    color: var(--accent-yellow);
}

.spacer {
    width: 80px;
}

/* ==========================================
   LAYOUT DESKTOP - Duas colunas
   ========================================== */
.profile-content-wrapper {
    flex: 1;
    padding: 20px;
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.profile-main-column {
    flex: 1;
    min-width: 300px;
}

.profile-edit-column {
    width: 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==========================================
   CARDS
   ========================================== */
.profile-card {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

.profile-card h3 {
    margin: 0 0 20px 0;
    color: var(--accent-yellow);
    font-size: 1.1em;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ==========================================
   INFO DO JOGADOR
   ========================================== */
.profile-info-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    flex-shrink: 0;
}

.profile-details {
    flex: 1;
}

.profile-details h2 {
    margin: 0 0 5px 0;
    font-size: 1.5em;
}

.profile-username {
    color: var(--text-muted);
    margin: 0 0 10px 0;
    font-size: 0.95em;
}

.profile-rank-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    background: var(--accent-purple);
    color: white;
    font-size: 0.85em;
    font-weight: bold;
}

/* ==========================================
   ESTATÍSTICAS
   ========================================== */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.profile-stat-box {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    transition: transform 0.2s;
}

.profile-stat-box:hover {
    transform: translateY(-3px);
}

.profile-stat-box.elo {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.2), rgba(241, 196, 15, 0.1));
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.profile-stat-box.highlight {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2), rgba(46, 204, 113, 0.1));
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.profile-stat-box.elo .stat-value {
    color: var(--accent-yellow);
}

.profile-stat-box.highlight .stat-value {
    color: var(--accent-green);
}

.stat-label {
    font-size: 0.8em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================
   FORMULÁRIOS
   ========================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-hint {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1em;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

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

/* ==========================================
   COR PREFERIDA
   ========================================== */
.color-options {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

.color-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

.color-option.selected {
    border-color: white;
    box-shadow: 0 0 20px rgba(255,255,255,0.5);
    transform: scale(1.05);
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5em;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* ==========================================
   TOGGLE SWITCH
   ========================================== */

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* Override .form-group label { display: block } — especificidade mais alta necessária */
.form-group .toggle-switch {
    display: flex;
    margin-bottom: 0;
    font-weight: normal;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 40px;
    height: 22px;
    background: #555;
    border-radius: 11px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #3498db;
}

.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(18px);
}

.toggle-label {
    color: #bdc3c7;
    font-size: 0.9em;
}

/* ==========================================
   BOTÕES
   ========================================== */
.profile-card .btn {
    width: 100%;
    margin-top: 10px;
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* ==========================================
   ALERTAS
   ========================================== */
.profile-alert {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: bold;
    display: none;
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

.profile-alert.visible {
    display: block;
}

.profile-alert.success {
    background: rgba(46, 204, 113, 0.9);
    color: white;
}

.profile-alert.error {
    background: rgba(231, 76, 60, 0.9);
    color: white;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* ==========================================
   RESPONSIVE - Mobile
   ========================================== */
@media (max-width: 900px) {
    .profile-content-wrapper {
        flex-direction: column;
    }
    
    .profile-edit-column {
        width: 100%;
    }
    
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .profile-content-wrapper {
        padding: 15px;
    }
    
    .profile-card {
        padding: 20px 15px;
    }
    
    .profile-info-section {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar {
        width: 70px;
        height: 70px;
        font-size: 2em;
    }
    
    .profile-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .profile-stat-box {
        padding: 15px 10px;
    }
    
    .stat-value {
        font-size: 1.5em;
    }
    
    .color-options {
        justify-content: center;
    }
    
    .color-option {
        width: 45px;
        height: 45px;
    }
}
