/* ========== PROFILE MODAL STYLES ========== */
.profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.profile-modal.active {
    display: flex;
}

.profile-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    position: relative;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.profile-header h2 {
    margin: 10px 0 5px;
    font-size: 24px;
}

.profile-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.profile-content {
    padding: 30px 20px;
}

.profile-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.profile-tab {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.profile-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}

.profile-info {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.profile-info label {
    display: block;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.profile-info p {
    margin: 0;
    font-size: 14px;
    color: #333;
    word-break: break-all;
}

.profile-footer {
    padding: 0 20px 20px;
    display: flex;
    gap: 10px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    transition: background 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

#changePasswordForm .form-group,
#changeUsernameForm .form-group {
    margin-bottom: 15px;
}

#changePasswordForm label,
#changeUsernameForm label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

#changePasswordForm input,
#changeUsernameForm input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

#changePasswordForm input:focus,
#changeUsernameForm input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#changePasswordForm input:disabled,
#changeUsernameForm input:disabled {
    background: #f5f5f5;
    color: #999;
}

.btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-cancel {
    background: #f0f0f0;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.message.loading {
    background: #cfe2ff;
    color: #084298;
    border: 1px solid #b6d4fe;
    display: block;
}

@media (max-width: 600px) {
    .profile-card {
        width: 95%;
        max-height: 100vh;
        border-radius: 12px 12px 0 0;
    }

    .btn-group {
        grid-template-columns: 1fr;
    }

    .profile-tabs {
        flex-direction: column;
    }

    .profile-tab {
        border-bottom: none;
        border-left: 3px solid transparent;
        padding-left: 15px;
    }

    .profile-tab.active {
        border-left-color: #667eea;
        border-bottom: none;
    }
}
